{sys-devel/gcc,dev-lang/gnat-gpl}: add a USE for building GCC with LTO

Bug: https://bugs.gentoo.org/685634

Signed-off-by: Shane Peelar <lookatyouhacker@gmail.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Shane Peelar
2019-05-08 14:55:53 -04:00
committed by Sergei Trofimovich
parent fa2997a88e
commit ee307a9f5d
2 changed files with 7 additions and 0 deletions

View File

@@ -174,6 +174,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 8.0 &&
IUSE+=" systemtap" TC_FEATURES+=(systemtap)
tc_version_is_at_least 9.0 && IUSE+=" d"
tc_version_is_at_least 9.1 && IUSE+=" lto"
fi
SLOT="${GCC_CONFIG_VER}"
@@ -993,6 +994,11 @@ toolchain_src_configure() {
confgcc+=( --enable-libstdcxx-time )
fi
# Build compiler using LTO
if tc_version_is_at_least 9.1 && use_if_iuse lto ; then
confgcc+=( --with-build-config=bootstrap-lto )
fi
# Support to disable pch when building libstdcxx
if tc_version_is_at_least 6.0 && ! use_if_iuse pch ; then
confgcc+=( --disable-libstdcxx-pch )

View File

@@ -21,6 +21,7 @@
This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag>
<flag name="libssp">Build SSP support into a dedicated library rather than use the
code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
<flag name="lto">Build using Link Time Optimizations (LTO)</flag>
<flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
<flag name="mudflap">Add support for mudflap, a pointer use checking library</flag>
<flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag>