Move disable_target_specific_optimizations to bfd_link_info

include/

	* bfdlink.h (bfd_link_info): Add
	disable_target_specific_optimizations.

ld/

	* ld.h (command_line): Remove
	disable_target_specific_optimizations.
	(RELAXATION_DISABLED_BY_DEFAULT): Removed.
	(RELAXATION_DISABLED_BY_USER): Likewise.
	(RELAXATION_ENABLED): Likewise.
	(DISABLE_RELAXATION): Likewise.
	(ENABLE_RELAXATION): Likewise.

	* ldmain.c (main): Updated.

	* ldmain.h (RELAXATION_DISABLED_BY_DEFAULT): New macro.
	(RELAXATION_DISABLED_BY_USER): Likewise.
	(RELAXATION_ENABLED): Likewise.
	(DISABLE_RELAXATION): Likewise.
	(ENABLE_RELAXATION): Likewise.
This commit is contained in:
H.J. Lu
2012-10-24 11:09:28 +00:00
parent 35c813e224
commit 4f9d22a0b1
6 changed files with 54 additions and 25 deletions

View File

@@ -420,6 +420,24 @@ struct bfd_link_info
means explicitly zero-sized. */
bfd_signed_vma stacksize;
/* Enable or disable target specific optimizations.
Not all targets have optimizations to enable.
Normally these optimizations are disabled by default but some targets
prefer to enable them by default. So this field is a tri-state variable.
The values are:
zero: Enable the optimizations (either from --relax being specified on
the command line or the backend's before_allocation emulation function.
positive: The user has requested that these optimizations be disabled.
(Via the --no-relax command line option).
negative: The optimizations are disabled. (Set when initializing the
args_type structure in ldmain.c:main. */
signed int disable_target_specific_optimizations;
/* Function callbacks. */
const struct bfd_link_callbacks *callbacks;