diff options
author | Nick Clifton <nickc@redhat.com> | 2009-11-26 13:45:24 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-11-26 13:45:24 +0000 |
commit | 32bc6679e47debef140f201fc533f219617e156d (patch) | |
tree | fe597e10601b66b315e3d71bcbfb249428b050f9 /ld/emultempl/cr16elf.em | |
parent | 603e77d7542349398bf79fe670a7ecda130e7cc0 (diff) | |
download | binutils-redhat-32bc6679e47debef140f201fc533f219617e156d.tar.gz |
PR ld/10956
* ld.h (struct args_type): Rename 'relax' field to
'disable_target_specific_optimizations' and turn it into a
tri-state variable.
(RELAXATION_DISABLED_BY_DEFAULT): New macro.
(RELAXATION_DISABLED_BY_USER): New macro.
(RELAXATION_ENABLED): New macro.
(DISABLE_RELAXATION): New macro.
(ENABLE_RELAXATION): New macro.
* lexsup (enum option_values): Add OPTION_NO_RELAX.
(struct ld_options): Add --no-relax.
(parse_args): Handle OPTION_NO_RELAX. Use DISABLE_RELAXATION and
ENABLE_RELAXATION macros.
* ldlang.c (lang_relax_sections): Use RELAXATION_ENABLED macro.
(lang_process): Likewise.
* ldmain.c (main): Initialise
disable_target_specific_optimizations field.
(multiple_definition): Use RELAXATION_ENABLED macro.
* ld.texinfo: Document new command line option.
* emultempl/alphaelf.em: Remove --no-relax option.
(before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
Use ENABLE_RELAXATION macro.
* emultempl/avrelf.em: (after_allocation): Test RELAXATION_ENABLED
macro.
* emultempl/cr16elf.em: Remove --no-relax option.
(before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
Use ENABLE_RELAXATION macro.
* emultempl/crxelf.em: Remove --no-relax option.
(before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
Use ENABLE_RELAXATION macro.
* emultempl/mmix-elfnmmo.em: (before_allocation): Use
ENABLE_RELAXATION macro.
* emultempl/needrelax.em: (before_allocation): Use
ENABLE_RELAXATION macro.
* emultempl/ppc32elf.em: (before_allocation): Test
RELAXATION_DISABLED_BY_DEFAULT macro. Use
ENABLE_RELAXATION macro.
* emultempl/sh64elf.em: (before_allocation): Test
RELAXATION_ENABLED macro. Use DISABLE_RELAXATION macro.
* emultempl/xtensaelf.em: Remove --no-relax option.
(before_allocation): Test RELAXATION_ENABLED macro.
Use ENABLE_RELAXATION macro.
Diffstat (limited to 'ld/emultempl/cr16elf.em')
-rw-r--r-- | ld/emultempl/cr16elf.em | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/ld/emultempl/cr16elf.em b/ld/emultempl/cr16elf.em index 83f07834b5..9850bda6b1 100644 --- a/ld/emultempl/cr16elf.em +++ b/ld/emultempl/cr16elf.em @@ -27,9 +27,6 @@ fragment <<EOF #include "ldctor.h" -/* Flag for the emulation-specific "--no-relax" option. */ -static bfd_boolean disable_relaxation = FALSE; - static void check_sections (bfd *, asection *, void *); @@ -173,34 +170,12 @@ cr16elf_before_allocation (void) specified. This is done here instead of in the before_parse hook because there is a check in main() to prohibit use of --relax and -r together. */ - - if (!disable_relaxation) - command_line.relax = TRUE; + if (RELAXATION_DISABLED_BY_DEFAULT) + ENABLE_RELAXATION; } EOF -# Define some shell vars to insert bits of code into the standard elf -# parse_args and list_options functions. -# -PARSE_AND_LIST_PROLOGUE=' -#define OPTION_NO_RELAX 301 -' - -PARSE_AND_LIST_LONGOPTS=' - { "no-relax", no_argument, NULL, OPTION_NO_RELAX}, -' - -PARSE_AND_LIST_OPTIONS=' - fprintf (file, _(" --no-relax Do not relax branches\n")); -' - -PARSE_AND_LIST_ARGS_CASES=' - case OPTION_NO_RELAX: - disable_relaxation = TRUE; - break; -' - # Put these extra cr16-elf routines in ld_${EMULATION_NAME}_emulation # LDEMUL_AFTER_OPEN=cr16_elf_after_open |