mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 14:12:26 +00:00
c27ab65e45
The gold linker cannot currently be built in a static toolchain build. This may get fixed in a future version of crosstool-NG. Also, there is a bit of weirdness here. versions of binutils >= 2.21 have GOLD (BINUTILS_HAS_GOLD), but that doesn't mean it should be used. For instance, if the architecture is not supported. So with that, we create a new hidden option: BINUTILS_GOLD_SUPPORT Which in turn depends on BINUTILS_GOLD_SUPPORTS_ARCH, BINUTILS_HAS_GOLD, and not STATIC_TOOLCHAIN... then replace anything that previously depended on BINUTILS_HAS_GOLD with our new BINUTILS_GOLD_SUPPORT option. This closes #210 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
338 lines
8.3 KiB
Plaintext
338 lines
8.3 KiB
Plaintext
# binutils options
|
|
|
|
comment "GNU binutils"
|
|
|
|
config CC_BINUTILS_SHOW_LINARO
|
|
bool
|
|
prompt "Show Linaro versions"
|
|
help
|
|
Linaro is maintaining some advanced/more stable/experimental versions
|
|
of binutils, especially for the ARM architecture.
|
|
|
|
Those versions have not been blessed by the binutils comunity (nor have they
|
|
been cursed either!), but they look to be pretty much stable, and even
|
|
more stable than the upstream versions. YMMV...
|
|
|
|
If you do not know what this Linaro stuff is, then simply say 'n' here,
|
|
and rest in peace. OTOH, if you know what you are doing, you will be
|
|
able to use and enjoy :-) the Linaro versions by saying 'y' here.
|
|
|
|
Linaro: http://www.linaro.org/
|
|
|
|
choice
|
|
bool
|
|
prompt "binutils version"
|
|
# Don't remove next line
|
|
# CT_INSERT_VERSION_BELOW
|
|
|
|
config BINUTILS_V_2_25_1
|
|
bool
|
|
prompt "2.25.1"
|
|
select BINUTILS_2_25_1_or_later
|
|
|
|
config BINUTILS_LINARO_V_2_25
|
|
bool
|
|
prompt "linaro-2.25.0-2015.01-2"
|
|
select BINUTILS_2_25_or_later
|
|
depends on CC_BINUTILS_SHOW_LINARO
|
|
|
|
config BINUTILS_V_2_25
|
|
bool
|
|
prompt "2.25"
|
|
select BINUTILS_2_25_or_later
|
|
|
|
config BINUTILS_LINARO_V_2_24
|
|
bool
|
|
prompt "linaro-2.24.0-2014.11-2"
|
|
select BINUTILS_2_24_or_later
|
|
depends on CC_BINUTILS_SHOW_LINARO
|
|
|
|
config BINUTILS_V_2_24
|
|
bool
|
|
prompt "2.24"
|
|
select BINUTILS_2_24_or_later
|
|
|
|
config BINUTILS_V_2_23_2
|
|
bool
|
|
prompt "2.23.2"
|
|
select BINUTILS_2_23_or_later
|
|
|
|
config BINUTILS_V_2_23_1
|
|
bool
|
|
prompt "2.23.1"
|
|
select BINUTILS_2_23_or_later
|
|
|
|
config BINUTILS_V_2_22
|
|
bool
|
|
prompt "2.22"
|
|
select BINUTILS_2_22_or_later
|
|
|
|
config BINUTILS_V_2_21_53
|
|
bool
|
|
prompt "2.21.53"
|
|
select BINUTILS_2_21_or_later
|
|
|
|
config BINUTILS_V_2_21_1a
|
|
bool
|
|
prompt "2.21.1a"
|
|
select BINUTILS_2_21_or_later
|
|
|
|
config BINUTILS_V_2_20_1a
|
|
bool
|
|
prompt "2.20.1a"
|
|
select BINUTILS_2_20_or_later
|
|
|
|
config BINUTILS_V_2_19_1a
|
|
bool
|
|
prompt "2.19.1a"
|
|
select BINUTILS_2_19_or_later
|
|
|
|
config BINUTILS_V_2_18a
|
|
bool
|
|
prompt "2.18a"
|
|
select BINUTILS_2_18_or_later
|
|
|
|
endchoice
|
|
|
|
config BINUTILS_CUSTOM
|
|
bool
|
|
prompt "Custom binutils"
|
|
depends on EXPERIMENTAL
|
|
|
|
if BINUTILS_CUSTOM
|
|
|
|
config BINUTILS_CUSTOM_LOCATION
|
|
string
|
|
prompt "Full path to custom binutils source"
|
|
default ""
|
|
help
|
|
Enter the path to the directory (or tarball) of your source for binutils,
|
|
or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/binutils
|
|
|
|
endif # BINUTILS_CUSTOM
|
|
|
|
config BINUTILS_VERSION
|
|
string
|
|
# Don't remove next line
|
|
# CT_INSERT_VERSION_STRING_BELOW
|
|
default "2.25.1" if BINUTILS_V_2_25_1
|
|
default "linaro-2.25.0-2015.01-2" if BINUTILS_LINARO_V_2_25
|
|
default "2.25" if BINUTILS_V_2_25
|
|
default "linaro-2.24.0-2014.11-2" if BINUTILS_LINARO_V_2_24
|
|
default "2.24" if BINUTILS_V_2_24
|
|
default "2.23.2" if BINUTILS_V_2_23_2
|
|
default "2.23.1" if BINUTILS_V_2_23_1
|
|
default "2.22" if BINUTILS_V_2_22
|
|
default "2.21.53" if BINUTILS_V_2_21_53
|
|
default "2.21.1a" if BINUTILS_V_2_21_1a
|
|
default "2.20.1a" if BINUTILS_V_2_20_1a
|
|
default "2.19.1a" if BINUTILS_V_2_19_1a
|
|
default "2.18a" if BINUTILS_V_2_18a
|
|
|
|
config BINUTILS_2_25_1_or_later
|
|
bool
|
|
select BINUTILS_2_25_or_later
|
|
|
|
config BINUTILS_2_25_or_later
|
|
bool
|
|
select BINUTILS_2_24_or_later
|
|
|
|
config BINUTILS_2_24_or_later
|
|
bool
|
|
select BINUTILS_2_23_or_later
|
|
|
|
config BINUTILS_2_23_or_later
|
|
bool
|
|
select BINUTILS_2_22_or_later
|
|
|
|
config BINUTILS_2_22_or_later
|
|
bool
|
|
select BINUTILS_2_21_or_later
|
|
|
|
config BINUTILS_2_21_or_later
|
|
bool
|
|
select BINUTILS_2_20_or_later
|
|
select BINUTILS_HAS_GOLD
|
|
select BINUTILS_HAS_PLUGINS
|
|
|
|
config BINUTILS_2_20_or_later
|
|
bool
|
|
select BINUTILS_2_19_or_later
|
|
|
|
config BINUTILS_2_19_or_later
|
|
bool
|
|
select BINUTILS_2_18_or_later
|
|
|
|
config BINUTILS_2_18_or_later
|
|
bool
|
|
select BINUTILS_HAS_PKGVERSION_BUGURL
|
|
select BINUTILS_HAS_HASH_STYLE
|
|
|
|
config BINUTILS_HAS_HASH_STYLE
|
|
bool
|
|
|
|
config BINUTILS_HAS_GOLD
|
|
bool
|
|
|
|
# gold only suports the listed architectures
|
|
config BINUTILS_GOLD_SUPPORTS_ARCH
|
|
bool
|
|
default y if ARCH_arm
|
|
default y if ARCH_x86
|
|
|
|
config BINUTILS_GOLD_SUPPORT
|
|
bool
|
|
default y
|
|
depends on BINUTILS_HAS_GOLD
|
|
depends on BINUTILS_GOLD_SUPPORTS_ARCH
|
|
depends on ! STATIC_TOOLCHAIN
|
|
|
|
config BINUTILS_HAS_PLUGINS
|
|
bool
|
|
|
|
config BINUTILS_HAS_PKGVERSION_BUGURL
|
|
bool
|
|
|
|
# Force using the BFD linker if needed
|
|
# This is the case for some C libraries (eg. glibc at least) and affected
|
|
# components can select this
|
|
config BINUTILS_FORCE_LD_BFD
|
|
bool
|
|
|
|
choice
|
|
bool
|
|
prompt "Linkers to enable"
|
|
|
|
config BINUTILS_LINKER_LD
|
|
bool
|
|
prompt "ld"
|
|
help
|
|
The historical, bfd linker.
|
|
|
|
config BINUTILS_LINKER_GOLD
|
|
bool
|
|
prompt "gold"
|
|
depends on BINUTILS_GOLD_SUPPORT
|
|
depends on ! BINUTILS_FORCE_LD_BFD
|
|
select BINUTILS_GOLD_INSTALLED
|
|
help
|
|
gold is a new, optimised, multi-threaded linker with support
|
|
for plugins. Designed to be a drop-in replacement for the
|
|
original linker, ld, it can be much faster, with a 5:1 or
|
|
bigger ratio being not uncommon, YMMV.
|
|
|
|
config BINUTILS_LINKER_LD_GOLD
|
|
bool
|
|
prompt "ld, gold"
|
|
depends on BINUTILS_GOLD_SUPPORT
|
|
select BINUTILS_GOLD_INSTALLED
|
|
select BINUTILS_LINKER_BOTH
|
|
help
|
|
Both the historical ld and the new gold linkers will be
|
|
installed, with ld being the default linker used.
|
|
|
|
See help for gold, above.
|
|
|
|
config BINUTILS_LINKER_GOLD_LD
|
|
bool
|
|
prompt "gold, ld"
|
|
depends on BINUTILS_GOLD_SUPPORT
|
|
select BINUTILS_GOLD_INSTALLED
|
|
select BINUTILS_LINKER_BOTH
|
|
select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD
|
|
help
|
|
Both the historical ld and the new gold linkers will be
|
|
installed, with gold being the default linker used.
|
|
|
|
See help for gold, above.
|
|
|
|
endchoice # Enable linkers
|
|
|
|
if BINUTILS_LINKER_GOLD
|
|
comment "WARNING! gold is not capable of"
|
|
comment "| building glibc!"
|
|
endif # BINUTILS_LINKER_GOLD
|
|
|
|
config BINUTILS_GOLD_INSTALLED
|
|
bool
|
|
|
|
config BINUTILS_GOLD_THREADS
|
|
bool
|
|
prompt "| Enable threaded gold"
|
|
depends on BINUTILS_GOLD_INSTALLED
|
|
help
|
|
When configured with threads, gold can link in parallel,
|
|
possibly cooperating with a make jobserver.
|
|
|
|
config BINUTILS_LINKER_BOTH
|
|
bool
|
|
|
|
config BINUTILS_LINKERS_LIST
|
|
string
|
|
default "ld" if BINUTILS_LINKER_LD
|
|
default "gold" if BINUTILS_LINKER_GOLD
|
|
default "ld,gold" if BINUTILS_LINKER_LD_GOLD
|
|
default "gold,ld" if BINUTILS_LINKER_GOLD_LD
|
|
|
|
config BINUTILS_LD_WRAPPER
|
|
bool
|
|
prompt "| Add ld wrapper"
|
|
depends on BINUTILS_LINKER_BOTH
|
|
help
|
|
Add an ld wrapper that calls to either gold or ld.
|
|
|
|
By default, the wrapper will call to the default wrapper,
|
|
but if you set the environment variable CTNG_LD_IS, you
|
|
can change which linker will get called:
|
|
CTNG_LD_IS=gold will unconditionally call the gold linker
|
|
CTNG_LD_IS=bfd will unconditionally call the old bfd ld linker
|
|
|
|
config BINUTILS_LINKER_DEFAULT
|
|
string
|
|
default "bfd" if BINUTILS_LINKER_LD || BINUTILS_LINKER_LD_GOLD
|
|
default "gold" if BINUTILS_LINKER_GOLD || BINUTILS_LINKER_GOLD_LD
|
|
|
|
config BINUTILS_PLUGINS
|
|
bool
|
|
prompt "Enable support for plugins"
|
|
depends on BINUTILS_HAS_PLUGINS
|
|
depends on ! STATIC_TOOLCHAIN
|
|
help
|
|
binutils can be extended through the use of plugins.
|
|
Especially, gold can use the lto-plugin, as installed
|
|
by gcc, to handle LTO.
|
|
|
|
config BINUTILS_EXTRA_CONFIG_ARRAY
|
|
string
|
|
prompt "binutils extra config"
|
|
default ""
|
|
help
|
|
Extra flags passed onto ./configure when configuring
|
|
|
|
You can enter multiple arguments here, and arguments can contain spaces
|
|
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
|
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
|
|
|
config BINUTILS_FOR_TARGET
|
|
bool
|
|
prompt "binutils libraries for the target"
|
|
depends on ! BARE_METAL
|
|
depends on ! BACKEND
|
|
help
|
|
Some utilities may need binutils libraries to be available on
|
|
the target, eg. oprofile.
|
|
|
|
if BINUTILS_FOR_TARGET
|
|
|
|
config BINUTILS_FOR_TARGET_IBERTY
|
|
bool
|
|
prompt "libiberty"
|
|
default y
|
|
|
|
config BINUTILS_FOR_TARGET_BFD
|
|
bool
|
|
prompt "libbfd"
|
|
default y
|
|
|
|
endif # BINUTILS_FOR_TARGET
|