summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-13 23:44:33 +0100
committerSam James <sam@gentoo.org>2023-04-13 23:44:33 +0100
commit3f9a5248fb796417d63ae1c1234b534a88f22f14 (patch)
treeafa5c7e3184ddb0121dac9a05380d0bee69fea2c /eclass
parenttoolchain.eclass: enhance USE=debug for more checking (diff)
downloadgentoo-3f9a5248fb796417d63ae1c1234b534a88f22f14.tar.gz
gentoo-3f9a5248fb796417d63ae1c1234b534a88f22f14.tar.bz2
gentoo-3f9a5248fb796417d63ae1c1234b534a88f22f14.zip
toolchain.eclass: pass improved checking for USE=debug for pre-releases too
Followup to 85db50a7c626a1844c8eb2d03051c8c5d320c205. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass22
1 files changed, 14 insertions, 8 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 1f32e4a9cda3..66cf8e88f9b2 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1066,15 +1066,21 @@ 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
- # 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.
+ # 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,extra,rtl ${off})}" )
fi