diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-12-29 17:58:35 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-12-29 17:58:35 +0100 |
commit | e5ded6e946074aeda1a82b4d01c5cc16954a2f64 (patch) | |
tree | 634f00070aa0eb4ccf0be95d2125c0bed219c169 | |
parent | 2841bb7a35cbdaa7ed68d078880f199319b083c8 (diff) | |
download | crosstool-ng-e5ded6e946074aeda1a82b4d01c5cc16954a2f64.tar.gz crosstool-ng-e5ded6e946074aeda1a82b4d01c5cc16954a2f64.tar.bz2 crosstool-ng-e5ded6e946074aeda1a82b4d01c5cc16954a2f64.zip |
cc/gcc: build lto-plugin if binutils' gold is built
To properly enable LTO with gold, gcc has to install a plugin that gold
uses to handle the LTO information.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | scripts/build/cc/gcc.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 405186c2..152335e2 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -481,6 +481,16 @@ do_cc() { "") 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 |