summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-12-15 12:18:34 +0000
committerSam James <sam@gentoo.org>2024-12-15 12:48:14 +0000
commit3ab36cc3531af8a39c1b28bc30f8b724b9242949 (patch)
tree8bfb8221b14cc2fa54ca546dc5a19911768a4967 /eclass
parentkde-apps/marble: drop 24.12.0 (diff)
downloadgentoo-3ab36cc3531af8a39c1b28bc30f8b724b9242949.tar.gz
gentoo-3ab36cc3531af8a39c1b28bc30f8b724b9242949.tar.bz2
gentoo-3ab36cc3531af8a39c1b28bc30f8b724b9242949.zip
toolchain.eclass: don't build with LTO for USE=ada && < gcc-12
There's another -Wlto-type-mismatch issue in GCC 11 with USE=ada and the patch we used in >=12 doesn't apply cleanly there, not worth spending the time on for an EOL branch. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 4e27cd2fb8f6..55b2127a4f11 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1323,8 +1323,13 @@ toolchain_src_configure() {
confgcc+=( --enable-lto )
# Build compiler itself using LTO
- if tc_version_is_at_least 9.1 && _tc_use_if_iuse lto ; then
- BUILD_CONFIG_TARGETS+=( bootstrap-lto )
+ if tc_use_if_iuse lto ; then
+ # GCC 11 at least has a -Wlto-type-mismatch issue with Ada
+ if ! tc_version_is_at_least 12.1 && is_ada ; then
+ :;
+ elif tc_version_is_at_least 9.1 ; then
+ BUILD_CONFIG_TARGETS+=( bootstrap-lto )
+ fi
fi
if tc_version_is_at_least 12 && _tc_use_if_iuse cet && [[ -z ${CLANG_DISABLE_CET_HACK} && ${CTARGET} == x86_64-*-gnu* ]] ; then