diff options
author | Nick Clifton <nickc@redhat.com> | 2009-11-26 13:45:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-11-26 13:45:25 +0000 |
commit | 28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f (patch) | |
tree | d2a5b9ce35ec5ae61d04c98564ff51460d3ec818 /ld/ldmain.c | |
parent | f1b9c60a8f8a6471f328fd1e1744c8592f63dd59 (diff) | |
download | gdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.zip gdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.tar.gz gdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.tar.bz2 |
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/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index 3ba0592..e0917f6 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -253,6 +253,7 @@ main (int argc, char **argv) command_line.warn_mismatch = TRUE; command_line.warn_search_mismatch = TRUE; command_line.check_section_addresses = -1; + command_line.disable_target_specific_optimizations = -1; /* We initialize DEMANGLING based on the environment variable COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the @@ -906,10 +907,10 @@ multiple_definition (struct bfd_link_info *info ATTRIBUTE_UNUSED, if (obfd != NULL) einfo (_("%D: first defined here\n"), obfd, osec, oval); - if (command_line.relax) + if (RELAXATION_ENABLED) { einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n")); - command_line.relax = 0; + command_line.disable_target_specific_optimizations = -1; } return TRUE; |