commit: 3f9a5248fb796417d63ae1c1234b534a88f22f14
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 13 22:44:33 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 13 22:44:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f9a5248
toolchain.eclass: pass improved checking for USE=debug for pre-releases too
Followup to 85db50a7c626a1844c8eb2d03051c8c5d320c205.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 22 ++++++++++++++--------
1 file 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