summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-10 23:55:34 +0100
committerSam James <sam@gentoo.org>2023-04-10 23:57:21 +0100
commit564b130fd1bc8a35ac4d673d5211654c49af3fda (patch)
tree3329a938ad41be87f39a3f94c5190e6081515e0e /eclass
parentdev-ruby/allison: add github upstream metadata (diff)
downloadgentoo-564b130fd1bc8a35ac4d673d5211654c49af3fda.tar.gz
gentoo-564b130fd1bc8a35ac4d673d5211654c49af3fda.tar.bz2
gentoo-564b130fd1bc8a35ac4d673d5211654c49af3fda.zip
toolchain.eclass: use upstream default checking for pre/non-released compilers
Note that this only affects actually-non-released compilers like GCC 13 at this point in time and *not* snapshots from the stable branches. Upstream default to more checking (asserts/runtime integrity checks) when 'gcc/DEV-PHASE' contains 'experimental'. Copy that and defer to the configure.ac default when it does. The practical upshot of this is that we go from --enable-checking=release for GCC 13 to --enable-checking=yes,extra. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6a04366bcc1e..0a5e2e1e50aa 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1069,9 +1069,12 @@ toolchain_src_configure() {
# Use the default ("release") checking because upstream usually neglects
# to test "disabled" so it has a history of breaking. bug #317217
if in_iuse debug ; then
- # The "release" keyword is new to 4.0. bug #551636
- local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
- confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
+ # Non-released versions get extra checks, follow configure.ac's default to for those.
+ if ! grep -q "experimental" gcc/DEV-PHASE ; then
+ # The "release" keyword is new to 4.0. bug #551636
+ local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
+ confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
+ fi
fi
# Branding