# HG changeset patch # User "Yann E. MORIN" # Date 1301958148 -7200 # Node ID 369664fd7cba9aaa36f666d2fe66d0e14a205df7 # Parent 1752ade7dc520c125cd73035973b4ae96e9e6175 binutils/binutils: add blind option to force use of ld.bfd during build gold is not capable of building glibc/eglibc, so we have to force using the BFD linker, ld.bfd. Offer a blind option that affected components can select to force use of the BFD linker during the build. Signed-off-by: "Yann E. MORIN" diff -r 1752ade7dc52 -r 369664fd7cba config/binutils/binutils.in --- a/config/binutils/binutils.in Tue Apr 05 23:34:16 2011 +0200 +++ b/config/binutils/binutils.in Tue Apr 05 01:02:28 2011 +0200 @@ -80,6 +80,12 @@ config ARCH_x86 select BINUTILS_GOLD_SUPPORTS_ARCH +# Force using the BFD linker if needed +# This is the case for some C libraries (eg. glibc and +# eglibc at least) and affected components can select this +config BINUTILS_FORCE_LD_BFD + bool + choice bool prompt "Linkers to enable" @@ -95,6 +101,7 @@ prompt "gold" depends on BINUTILS_HAS_GOLD depends on BINUTILS_GOLD_SUPPORTS_ARCH + depends on ! BINUTILS_FORCE_LD_BFD depends on EXPERIMENTAL select BINUTILS_GOLD_INSTALLED help @@ -125,6 +132,7 @@ depends on EXPERIMENTAL 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. diff -r 1752ade7dc52 -r 369664fd7cba scripts/build/binutils/binutils.sh --- a/scripts/build/binutils/binutils.sh Tue Apr 05 23:34:16 2011 +0200 +++ b/scripts/build/binutils/binutils.sh Tue Apr 05 01:02:28 2011 +0200 @@ -96,6 +96,11 @@ chmod +x "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ld" cp -a "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ld" \ "${CT_PREFIX_DIR}/${CT_TARGET}/bin/ld" + + # If needed, force using ld.bfd during the toolchain build + if [ "${CT_BINUTILS_FORCE_LD_BFD}" = "y" ]; then + export CTNG_LD_IS=bfd + fi fi # Make those new tools available to the core C compilers to come.