summaryrefslogtreecommitdiff
path: root/eclass/toolchain.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-14 05:44:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-14 05:44:50 +0100
commit1d18b53ed419c49eb3f71637ccd58a431c1368d4 (patch)
treeeb3671b1209855aa64534ee96262d06bcda99d74 /eclass/toolchain.eclass
parentfdca6388cf31827202fae75cae067c695bd09339 (diff)
gentoo auto-resync : 14:04:2023 - 05:44:49
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass21
1 files changed, 15 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0a5e2e1e50aa..66cf8e88f9b2 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1066,14 +1066,23 @@ toolchain_src_configure() {
confgcc+=( --disable-libunwind-exceptions )
- # 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
- # 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
+ # Non-released versions get extra checks, follow configure.ac's default to for those
+ # unless USE=debug. Note that snapshots on stable branches don't count as "non-released"
+ # for these purposes.
+ if grep -q "experimental" gcc/DEV-PHASE ; then
+ # - USE=debug for pre-releases: yes,extra,rtl
+ # - USE=-debug for pre-releases: yes,extra (following upstream default)
+ confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes,extra,rtl yes,extra)}" )
+ else
+ # - Use the default ("release") checking because upstream usually neglects
+ # to test "disabled" so it has a history of breaking. bug #317217.
+ # - The "release" keyword is new to 4.0. bug #551636.
+ # - After discussing in #gcc, we concluded that =yes,extra,rtl makes
+ # more sense when a user explicitly requests USE=debug. If rtl is too slow,
+ # we can change this to yes,extra.
local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
- confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
+ confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes,extra,rtl ${off})}" )
fi
fi