diff -r a2f4986779bf -r 4ea8e6d381f0 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Thu Dec 09 18:55:59 2010 +0100 +++ b/scripts/build/cc/gcc.sh Wed Dec 29 17:58:35 2010 +0100 @@ -481,6 +481,16 @@ "") extra_config+=("--without-long-double-128");; esac + # If LTO is selected and binutils has gold, then enable + # building the lto plugin with the --enable-gold option, + # but only if gold has support for plugins. + if [ "${CT_BINUTILS_GOLD_INSTALLED}" = "y" \ + -a "${CT_BINUTILS_GOLD_PLUGINS}" = "y" \ + -a "${CT_CC_GCC_USE_LTO}" = "y" \ + ]; then + extra_config+=( --enable-gold ) + fi + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # --enable-symvers=gnu really only needed for sh4 to work around a