mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
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>
This commit is contained in:
parent
2841bb7a35
commit
e5ded6e946
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user