diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-04 20:48:39 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-04 20:48:39 +0000 |
commit | 13a54dd947d4ca9283957c82108891aa874bc397 (patch) | |
tree | e2c9b6c9ff6c38ce8d977d64a8ed28287a1b5374 | |
parent | e8b4e44bddfded1edd38d182015ec2b175b4212b (diff) | |
download | gcc-13a54dd947d4ca9283957c82108891aa874bc397.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164960 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 64 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 9 | ||||
-rw-r--r-- | gcc/config/alpha/elf.h | 2 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 14 | ||||
-rw-r--r-- | gcc/config/frv/frv.h | 2 | ||||
-rw-r--r-- | gcc/config/g.opt | 2 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 9 | ||||
-rw-r--r-- | gcc/config/lm32/lm32.c | 22 | ||||
-rw-r--r-- | gcc/config/lm32/lm32.h | 4 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.c | 11 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.h | 6 | ||||
-rw-r--r-- | gcc/config/microblaze/microblaze.c | 10 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 11 | ||||
-rw-r--r-- | gcc/config/rs6000/sysv4.h | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/vxworks.h | 4 | ||||
-rw-r--r-- | gcc/config/score/score.c | 5 | ||||
-rw-r--r-- | gcc/config/score/score3.c | 6 | ||||
-rw-r--r-- | gcc/config/score/score7.c | 6 | ||||
-rw-r--r-- | gcc/flags.h | 4 | ||||
-rw-r--r-- | gcc/opts.c | 4 |
21 files changed, 104 insertions, 100 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ce81a037c2..01e33810f0d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index fda8c75dbd7..46627e379a2 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -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; } diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h index 57ab91e2f3c..78b2858db56 100644 --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -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); \ diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 42d0b1d9d0e..401aeecf65b 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -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; diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index 463f6ad1ecc..bf433d9978e 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -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); \ diff --git a/gcc/config/g.opt b/gcc/config/g.opt index 346a4d1af92..b0e30348d80 100644 --- a/gcc/config/g.opt +++ b/gcc/config/g.opt @@ -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. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 32fee12e3af..d2728606861 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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; diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c index a0e9472c5ec..671f0e16d27 100644 --- a/gcc/config/lm32/lm32.c +++ b/gcc/config/lm32/lm32.c @@ -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; } diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h index f629d0fcf62..b0c2d59ca9c 100644 --- a/gcc/config/lm32/lm32.h +++ b/gcc/config/lm32/lm32.h @@ -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); \ diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 6748f04527c..903f410a07d 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -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) diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index c232a74258c..d767cb9234e 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -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); \ diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index d600c800402..9872d8f7e2c 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -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) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 56e4f2da16f..95994cfc7a9 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0b058d396ef..030bb615f0c 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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))) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 69e9e82f570..25584b2f502 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -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) \ diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h index 1b23835959f..d7484197f05 100644 --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -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) diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c index f2b2215f617..764293a9d65 100644 --- a/gcc/config/score/score.c +++ b/gcc/config/score/score.c @@ -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; diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c index d4b171e05d2..fd2e7844abd 100644 --- a/gcc/config/score/score3.c +++ b/gcc/config/score/score3.c @@ -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"); } diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c index f1c86230d54..85ae0171790 100644 --- a/gcc/config/score/score7.c +++ b/gcc/config/score/score7.c @@ -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"); } diff --git a/gcc/flags.h b/gcc/flags.h index e69de534427..6e7e112e45b 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -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; diff --git a/gcc/opts.c b/gcc/opts.c index 393c8b115a0..6799f9bd385 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -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; |