1.1 --- a/config/binutils/binutils.in Tue Apr 05 23:34:16 2011 +0200
1.2 +++ b/config/binutils/binutils.in Tue Apr 05 01:02:28 2011 +0200
1.3 @@ -80,6 +80,12 @@
1.4 config ARCH_x86
1.5 select BINUTILS_GOLD_SUPPORTS_ARCH
1.6
1.7 +# Force using the BFD linker if needed
1.8 +# This is the case for some C libraries (eg. glibc and
1.9 +# eglibc at least) and affected components can select this
1.10 +config BINUTILS_FORCE_LD_BFD
1.11 + bool
1.12 +
1.13 choice
1.14 bool
1.15 prompt "Linkers to enable"
1.16 @@ -95,6 +101,7 @@
1.17 prompt "gold"
1.18 depends on BINUTILS_HAS_GOLD
1.19 depends on BINUTILS_GOLD_SUPPORTS_ARCH
1.20 + depends on ! BINUTILS_FORCE_LD_BFD
1.21 depends on EXPERIMENTAL
1.22 select BINUTILS_GOLD_INSTALLED
1.23 help
1.24 @@ -125,6 +132,7 @@
1.25 depends on EXPERIMENTAL
1.26 select BINUTILS_GOLD_INSTALLED
1.27 select BINUTILS_LINKER_BOTH
1.28 + select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD
1.29 help
1.30 Both the historical ld and the new gold linkers will be
1.31 installed, with gold being the default linker used.
2.1 --- a/scripts/build/binutils/binutils.sh Tue Apr 05 23:34:16 2011 +0200
2.2 +++ b/scripts/build/binutils/binutils.sh Tue Apr 05 01:02:28 2011 +0200
2.3 @@ -96,6 +96,11 @@
2.4 chmod +x "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ld"
2.5 cp -a "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ld" \
2.6 "${CT_PREFIX_DIR}/${CT_TARGET}/bin/ld"
2.7 +
2.8 + # If needed, force using ld.bfd during the toolchain build
2.9 + if [ "${CT_BINUTILS_FORCE_LD_BFD}" = "y" ]; then
2.10 + export CTNG_LD_IS=bfd
2.11 + fi
2.12 fi
2.13
2.14 # Make those new tools available to the core C compilers to come.