flags.h (g_switch_value, [...]): Remove.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 4 Oct 2010 20:48:39 +0000 (21:48 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 4 Oct 2010 20:48:39 +0000 (21:48 +0100)
* flags.h (g_switch_value, g_switch_set): Remove.
* opts.c (g_switch_value, g_switch_set): Remove.
* config/g.opt (G): Add Var(g_switch_value).
* config/alpha/alpha.c (alpha_handle_option): Don't handle -G
here.
(alpha_option_override): Check global_options_set.x_g_switch_value
instead of g_switch_set.
(alpha_in_small_data_p): Remove cast in comparison with
g_switch_value.
* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast
g_switch_value to unsigned HOST_WIDE_INT.
* config/frv/frv.c (frv_const_unspec_p): Remove cast in comparison
with g_switch_value.
(frv_handle_option): Don't handle -G here.
(frv_option_override): Check global_options_set.x_g_switch_value
instead of g_switch_set.  Don't modify g_switch_set.
(frv_in_small_data_p): Remove cast in comparison with
g_switch_value.
* config/frv/frv.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Cast
g_switch_value to unsigned HOST_WIDE_INT.
* config/ia64/ia64.c (ia64_handle_option): Don't handle -G here.
(ia64_option_override): Check global_options_set.x_g_switch_value
instead of g_switch_set.
* config/lm32/lm32.c (lm32_handle_option, TARGET_HANDLE_OPTION):
Remove.
(lm32_in_small_data_p): Remove cast in comparison with
g_switch_value.
* config/lm32/lm32.h (ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_ALIGNED_COMMON): Cast g_switch_value to unsigned
HOST_WIDE_INT.
* config/m32r/m32r.c (m32r_handle_option): Don't handle -G here.
(m32r_init): Check global_options_set.x_g_switch_value instead of
g_switch_set.
(m32r_in_small_data_p): Remove cast in comparison with
g_switch_value.
(m32r_file_start): Format g_switch_value with %d.
* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON,
ASM_OUTPUT_ALIGNED_BSS): Cast g_switch_value to unsigned
HOST_WIDE_INT.
* config/microblaze/microblaze.c (microblaze_handle_option): Don't
handle -G here.
(microblaze_option_override): Check
global_options_set.x_g_switch_value instead of g_switch_set.
* config/mips/mips.c (mips_handle_option): Don't handle -G here.
(mips_option_override): Check global_options_set.x_g_switch_value
instead of g_switch_set.
* config/rs6000/rs6000.c (rs6000_handle_option): Don't handle -G
here.
(rs6000_file_start): Format g_switch_value with %d.
(small_data_operand, rs6000_elf_in_small_data_p): Remove casts in
comparisons with g_switch_value.
* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Check
global_options_set.x_g_switch_value instead of g_switch_set.
* config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check
global_options_set.x_g_switch_value instead of g_switch_set.
* config/score/score.c (score_handle_option): Don't handle -G
here.
* config/score/score3.c (score3_option_override): Check
global_options_set.x_g_switch_value instead of g_switch_set.
* config/score/score7.c (score7_option_override): Check
global_options_set.x_g_switch_value instead of g_switch_set.

From-SVN: r164960

21 files changed:
gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/elf.h
gcc/config/frv/frv.c
gcc/config/frv/frv.h
gcc/config/g.opt
gcc/config/ia64/ia64.c
gcc/config/lm32/lm32.c
gcc/config/lm32/lm32.h
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.h
gcc/config/microblaze/microblaze.c
gcc/config/mips/mips.c
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/vxworks.h
gcc/config/score/score.c
gcc/config/score/score3.c
gcc/config/score/score7.c
gcc/flags.h
gcc/opts.c

index 9ce81a0..01e3381 100644 (file)
@@ -1,3 +1,67 @@
+2010-10-04  Joseph Myers  <joseph@codesourcery.com>
+
+       * flags.h (g_switch_value, g_switch_set): Remove.
+       * opts.c (g_switch_value, g_switch_set): Remove.
+       * config/g.opt (G): Add Var(g_switch_value).
+       * config/alpha/alpha.c (alpha_handle_option): Don't handle -G
+       here.
+       (alpha_option_override): Check global_options_set.x_g_switch_value
+       instead of g_switch_set.
+       (alpha_in_small_data_p): Remove cast in comparison with
+       g_switch_value.
+       * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast
+       g_switch_value to unsigned HOST_WIDE_INT.
+       * config/frv/frv.c (frv_const_unspec_p): Remove cast in comparison
+       with g_switch_value.
+       (frv_handle_option): Don't handle -G here.
+       (frv_option_override): Check global_options_set.x_g_switch_value
+       instead of g_switch_set.  Don't modify g_switch_set.
+       (frv_in_small_data_p): Remove cast in comparison with
+       g_switch_value.
+       * config/frv/frv.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Cast
+       g_switch_value to unsigned HOST_WIDE_INT.
+       * config/ia64/ia64.c (ia64_handle_option): Don't handle -G here.
+       (ia64_option_override): Check global_options_set.x_g_switch_value
+       instead of g_switch_set.
+       * config/lm32/lm32.c (lm32_handle_option, TARGET_HANDLE_OPTION):
+       Remove.
+       (lm32_in_small_data_p): Remove cast in comparison with
+       g_switch_value.
+       * config/lm32/lm32.h (ASM_OUTPUT_ALIGNED_LOCAL,
+       ASM_OUTPUT_ALIGNED_COMMON): Cast g_switch_value to unsigned
+       HOST_WIDE_INT.
+       * config/m32r/m32r.c (m32r_handle_option): Don't handle -G here.
+       (m32r_init): Check global_options_set.x_g_switch_value instead of
+       g_switch_set.
+       (m32r_in_small_data_p): Remove cast in comparison with
+       g_switch_value.
+       (m32r_file_start): Format g_switch_value with %d.
+       * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON,
+       ASM_OUTPUT_ALIGNED_BSS): Cast g_switch_value to unsigned
+       HOST_WIDE_INT.
+       * config/microblaze/microblaze.c (microblaze_handle_option): Don't
+       handle -G here.
+       (microblaze_option_override): Check
+       global_options_set.x_g_switch_value instead of g_switch_set.
+       * config/mips/mips.c (mips_handle_option): Don't handle -G here.
+       (mips_option_override): Check global_options_set.x_g_switch_value
+       instead of g_switch_set.
+       * config/rs6000/rs6000.c (rs6000_handle_option): Don't handle -G
+       here.
+       (rs6000_file_start): Format g_switch_value with %d.
+       (small_data_operand, rs6000_elf_in_small_data_p): Remove casts in
+       comparisons with g_switch_value.
+       * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Check
+       global_options_set.x_g_switch_value instead of g_switch_set.
+       * config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check
+       global_options_set.x_g_switch_value instead of g_switch_set.
+       * config/score/score.c (score_handle_option): Don't handle -G
+       here.
+       * config/score/score3.c (score3_option_override): Check
+       global_options_set.x_g_switch_value instead of g_switch_set.
+       * config/score/score7.c (score7_option_override): Check
+       global_options_set.x_g_switch_value instead of g_switch_set.
+
 2010-10-04  Vladimir Makarov  <vmakarov@redhat.com>
 
        * common.opt (fira-coalesce): Remove.
index fda8c75..46627e3 100644 (file)
@@ -215,11 +215,6 @@ alpha_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      break;
-
     case OPT_mfp_regs:
       if (value == 0)
        target_flags |= MASK_SOFT_FP;
@@ -487,7 +482,7 @@ alpha_option_override (void)
   }
 
   /* Default the definition of "small data" to 8 bytes.  */
-  if (!g_switch_set)
+  if (!global_options_set.x_g_switch_value)
     g_switch_value = 8;
 
   /* Infer TARGET_SMALL_DATA from -fpic/-fPIC.  */
@@ -775,7 +770,7 @@ alpha_in_small_data_p (const_tree exp)
 
       /* If this is an incomplete type with size 0, then we can't put it
         in sdata because it might be too big when completed.  */
-      if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
+      if (size > 0 && size <= g_switch_value)
        return true;
     }
 
index 57ab91e..78b2858 100644 (file)
@@ -121,7 +121,7 @@ do {                                                                        \
 #undef  ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)              \
 do {                                                                   \
-  if ((SIZE) <= g_switch_value)                                                \
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)               \
     switch_to_section (sbss_section);                                  \
   else                                                                 \
     switch_to_section (bss_section);                                   \
index 42d0b1d..401aeec 100644 (file)
@@ -572,7 +572,7 @@ frv_const_unspec_p (rtx x, struct frv_unspec *unspec)
 
          if (frv_small_data_reloc_p (unspec->symbol, unspec->reloc)
              && unspec->offset > 0
-             && (unsigned HOST_WIDE_INT) unspec->offset < g_switch_value)
+             && unspec->offset < g_switch_value)
            return true;
        }
     }
@@ -611,11 +611,6 @@ frv_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_mcpu_:
       if (strcmp (arg, "simple") == 0)
        frv_cpu_type = FRV_CPU_SIMPLE;
@@ -692,9 +687,8 @@ frv_option_override (void)
       if (!flag_pic)           /* -fPIC */
        flag_pic = 2;
 
-      if (! g_switch_set)      /* -G0 */
+      if (!global_options_set.x_g_switch_value)        /* -G0 */
        {
-         g_switch_set = 1;
          g_switch_value = 0;
        }
     }
@@ -786,7 +780,7 @@ frv_option_override (void)
     }
 
   /* Check for small data option */
-  if (!g_switch_set)
+  if (!global_options_set.x_g_switch_value && !TARGET_LIBPIC)
     g_switch_value = SDATA_DEFAULT_SIZE;
 
   /* A C expression which defines the machine-dependent operand
@@ -9570,7 +9564,7 @@ frv_in_small_data_p (const_tree decl)
     }
 
   size = int_size_in_bytes (TREE_TYPE (decl));
-  if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
+  if (size > 0 && size <= g_switch_value)
     return true;
 
   return false;
index 463f6ad..bf433d9 100644 (file)
@@ -2069,7 +2069,7 @@ extern int size_directive_output;
 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \
 do {                                                                           \
-  if ((SIZE) > 0 && (SIZE) <= g_switch_value)                          \
+  if ((SIZE) > 0 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \
     switch_to_section (get_named_section (NULL, ".sbss", 0));           \
   else                                                                         \
     switch_to_section (bss_section);                                   \
index 346a4d1..b0e3034 100644 (file)
@@ -24,7 +24,7 @@
 ; Please try to keep this file in ASCII collating order.
 
 G
-Target Joined Separate UInteger
+Target Joined Separate UInteger Var(g_switch_value)
 -G<number>     Put global and static data smaller than <number> bytes into a special section (on some targets)
 
 ; This comment is to ensure we retain the blank line above.
index 32fee12..d272860 100644 (file)
@@ -5566,11 +5566,6 @@ ia64_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_mfixed_range_:
       fix_range (arg);
       return true;
@@ -5627,7 +5622,9 @@ ia64_option_override (void)
     flag_ira_loop_pressure = 1;
 
 
-  ia64_section_threshold = g_switch_set ? g_switch_value : IA64_DEFAULT_GVALUE;
+  ia64_section_threshold = (global_options_set.x_g_switch_value
+                           ? g_switch_value
+                           : IA64_DEFAULT_GVALUE);
 
   init_machine_status = ia64_init_machine_status;
 
index a0e9472..671f0e1 100644 (file)
@@ -75,11 +75,8 @@ static bool lm32_can_eliminate (const int, const int);
 static bool
 lm32_legitimate_address_p (enum machine_mode mode, rtx x, bool strict);
 static HOST_WIDE_INT lm32_compute_frame_size (int size);
-static bool lm32_handle_option (size_t code, const char *arg, int value);
 static void lm32_option_override (void);
 
-#undef TARGET_HANDLE_OPTION
-#define TARGET_HANDLE_OPTION lm32_handle_option
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE lm32_option_override
 #undef TARGET_ADDRESS_COST
@@ -698,23 +695,6 @@ lm32_setup_incoming_varargs (CUMULATIVE_ARGS * cum, enum machine_mode mode,
     }
 }
 
-/* Implement TARGET_HANDLE_OPTION.  */
-
-static bool
-lm32_handle_option (size_t code, const char *arg ATTRIBUTE_UNUSED, int value)
-{
-  switch (code)
-    {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
-    default:
-      return true;
-    }
-}
-
 /* Override command line options.  */
 static void
 lm32_option_override (void)
@@ -797,7 +777,7 @@ lm32_in_small_data_p (const_tree exp)
 
       /* If this is an incomplete type with size 0, then we can't put it
          in sdata because it might be too big when completed.  */
-      if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
+      if (size > 0 && size <= g_switch_value)
        return true;
     }
 
index f629d0f..b0c2d59 100644 (file)
@@ -429,7 +429,7 @@ enum reg_class
 #undef  ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)              \
 do {                                                                   \
-  if ((SIZE) <= g_switch_value)                                                \
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)               \
     switch_to_section (sbss_section);                                  \
   else                                                                 \
     switch_to_section (bss_section);                                   \
@@ -446,7 +446,7 @@ do {                                                                        \
 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
 do                                                                     \
 {                                                                      \
-  if ((SIZE) <= g_switch_value)                                                \
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)               \
     {                                                                  \
       switch_to_section (sbss_section);                                        \
       (*targetm.asm_out.globalize_label) (FILE, NAME);                 \
index 6748f04..903f410 100644 (file)
@@ -210,11 +210,6 @@ m32r_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_m32r:
       target_flags &= ~(MASK_M32R2 | MASK_M32RX);
       return true;
@@ -270,7 +265,7 @@ m32r_init (void)
   m32r_punct_chars['@'] = 1; /* ??? no longer used */
 
   /* Provide default value if not specified.  */
-  if (!g_switch_set)
+  if (!global_options_set.x_g_switch_value)
     g_switch_value = SDATA_DEFAULT_SIZE;
 }
 
@@ -545,7 +540,7 @@ m32r_in_small_data_p (const_tree decl)
        {
          int size = int_size_in_bytes (TREE_TYPE (decl));
 
-         if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
+         if (size > 0 && size <= g_switch_value)
            return true;
        }
     }
@@ -2106,7 +2101,7 @@ m32r_file_start (void)
 
   if (flag_verbose_asm)
     fprintf (asm_out_file,
-            "%s M32R/D special options: -G " HOST_WIDE_INT_PRINT_UNSIGNED "\n",
+            "%s M32R/D special options: -G %d\n",
             ASM_COMMENT_START, g_switch_value);
 
   if (TARGET_LITTLE_ENDIAN)
index c232a74..d767cb9 100644 (file)
@@ -1227,7 +1227,8 @@ L2:     .word STATIC
   do                                                                   \
     {                                                                  \
       if (! TARGET_SDATA_NONE                                          \
-         && (SIZE) > 0 && (SIZE) <= g_switch_value)                    \
+         && (SIZE) > 0                                                 \
+         && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)         \
        fprintf ((FILE), "%s", SCOMMON_ASM_OP);                         \
       else                                                             \
        fprintf ((FILE), "%s", COMMON_ASM_OP);                          \
@@ -1240,7 +1241,8 @@ L2:     .word STATIC
   do                                                                   \
     {                                                                  \
       if (! TARGET_SDATA_NONE                                          \
-          && (SIZE) > 0 && (SIZE) <= g_switch_value)                   \
+          && (SIZE) > 0                                                        \
+         && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)         \
         switch_to_section (get_named_section (NULL, ".sbss", 0));      \
       else                                                             \
         switch_to_section (bss_section);                               \
index d600c80..9872d8f 100644 (file)
@@ -1279,11 +1279,6 @@ microblaze_handle_option (size_t code,
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_mno_clearbss:
       flag_zero_initialized_in_bss = 0;
       warning (0, "-mno-clearbss is deprecated; use -fno-zero-initialized-in-bss");
@@ -1304,8 +1299,9 @@ microblaze_option_override (void)
   register enum machine_mode mode;
   int ver;
 
-  microblaze_section_threshold =
-    g_switch_set ? g_switch_value : MICROBLAZE_DEFAULT_GVALUE;
+  microblaze_section_threshold = (global_options_set.x_g_switch_value
+                                 ? g_switch_value
+                                 : MICROBLAZE_DEFAULT_GVALUE);
 
   /* Check the MicroBlaze CPU version for any special action to be done.  */
   if (microblaze_select_cpu == NULL)
index 56e4f2d..95994cf 100644 (file)
@@ -15442,11 +15442,6 @@ mips_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_mabi_:
       if (strcmp (arg, "32") == 0)
        mips_abi = ABI_32;
@@ -15527,7 +15522,7 @@ mips_option_override (void)
     TARGET_INTERLINK_MIPS16 = 1;
 
   /* Set the small data limit.  */
-  mips_small_data_threshold = (g_switch_set
+  mips_small_data_threshold = (global_options_set.x_g_switch_value
                               ? g_switch_value
                               : MIPS_DEFAULT_GVALUE);
 
index 0b058d3..030bb61 100644 (file)
@@ -3996,11 +3996,6 @@ rs6000_handle_option (size_t code, const char *arg, int value)
 
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      break;
-
     case OPT_mno_power:
       target_flags &= ~(MASK_POWER | MASK_POWER2
                        | MASK_MULTIPLE | MASK_STRING);
@@ -4425,7 +4420,7 @@ rs6000_file_start (void)
 
       if (rs6000_sdata && g_switch_value)
        {
-         fprintf (file, "%s -G " HOST_WIDE_INT_PRINT_UNSIGNED, start,
+         fprintf (file, "%s -G %d", start,
                   g_switch_value);
          start = "";
        }
@@ -5416,7 +5411,7 @@ small_data_operand (rtx op ATTRIBUTE_UNUSED,
       /* We have to be careful here, because it is the referenced address
         that must be 32k from _SDA_BASE_, not just the symbol.  */
       summand = INTVAL (XEXP (sum, 1));
-      if (summand < 0 || (unsigned HOST_WIDE_INT) summand > g_switch_value)
+      if (summand < 0 || summand > g_switch_value)
        return 0;
 
       sym_ref = XEXP (sum, 0);
@@ -24834,7 +24829,7 @@ rs6000_elf_in_small_data_p (const_tree decl)
       HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
 
       if (size > 0
-         && (unsigned HOST_WIDE_INT) size <= g_switch_value
+         && size <= g_switch_value
          /* If it's not public, and we're not going to reference it there,
             there's no need to put it in the small data section.  */
          && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl)))
index 69e9e82..25584b2 100644 (file)
@@ -81,7 +81,7 @@ extern const char *rs6000_tls_size_string; /* For -mtls-size= */
 
 #define SUBTARGET_OVERRIDE_OPTIONS                                     \
 do {                                                                   \
-  if (!g_switch_set)                                                   \
+  if (!global_options_set.x_g_switch_value)                            \
     g_switch_value = SDATA_DEFAULT_SIZE;                               \
                                                                        \
   if (rs6000_abi_name == NULL)                                         \
index 1b23835..d748419 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Vxworks PowerPC version.
-   Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007, 2009
+   Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by CodeSourcery, LLC.
 
@@ -141,7 +141,7 @@ VXWORKS_ADDITIONAL_CPP_SPEC
        rs6000_float_gprs = 1;                  \
       }                                                \
                                                \
-  if (!g_switch_set)                           \
+  if (!global_options_set.x_g_switch_value)    \
     g_switch_value = SDATA_DEFAULT_SIZE;       \
   VXWORKS_OVERRIDE_OPTIONS;                    \
   } while (0)
index f2b2215..764293a 100644 (file)
@@ -295,11 +295,6 @@ score_handle_option (size_t code, const char *arg, int value)
 {
   switch (code)
     {
-    case OPT_G:
-      g_switch_value = value;
-      g_switch_set = true;
-      return true;
-
     case OPT_mscore7d:
       target_flags &= ~(MASK_ALL_CPU_BITS);
       target_flags |= MASK_SCORE7 | MASK_SCORE7D;
index d4b171e..fd2e784 100644 (file)
@@ -641,11 +641,13 @@ score3_option_override (void)
 {
   flag_pic = false;
   if (!flag_pic)
-    score3_sdata_max = g_switch_set ? g_switch_value : SCORE3_DEFAULT_SDATA_MAX;
+    score3_sdata_max = (global_options_set.x_g_switch_value
+                       ? g_switch_value
+                       : SCORE3_DEFAULT_SDATA_MAX);
   else
     {
       score3_sdata_max = 0;
-      if (g_switch_set && (g_switch_value != 0))
+      if (global_options_set.x_g_switch_value && (g_switch_value != 0))
         warning (0, "-fPIC and -G are incompatible");
     }
 
index f1c8623..85ae017 100644 (file)
@@ -640,11 +640,13 @@ score7_option_override (void)
 {
   flag_pic = false;
   if (!flag_pic)
-    score7_sdata_max = g_switch_set ? g_switch_value : SCORE7_DEFAULT_SDATA_MAX;
+    score7_sdata_max = (global_options_set.x_g_switch_value
+                       ? g_switch_value
+                       : SCORE7_DEFAULT_SDATA_MAX);
   else
     {
       score7_sdata_max = 0;
-      if (g_switch_set && (g_switch_value != 0))
+      if (global_options_set.x_g_switch_value && (g_switch_value != 0))
         warning (0, "-fPIC and -G are incompatible");
     }
 
index e69de53..6e7e112 100644 (file)
@@ -272,10 +272,6 @@ extern struct target_flag_state *this_target_flag_state;
 /* Nonzero if subexpressions must be evaluated from left-to-right.  */
 extern int flag_evaluation_order;
 
-/* Value of the -G xx switch, and whether it was passed or not.  */
-extern unsigned HOST_WIDE_INT g_switch_value;
-extern bool g_switch_set;
-
 /* Whether to run the warn_unused_result attribute pass.  */
 extern bool flag_warn_unused_result;
 
index 393c8b1..6799f9b 100644 (file)
@@ -46,10 +46,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "lto-streamer.h"
 
-/* Value of the -G xx switch, and whether it was passed or not.  */
-unsigned HOST_WIDE_INT g_switch_value;
-bool g_switch_set;
-
 /* True if we should exit after parsing options.  */
 bool exit_after_options;