From 1d18b53ed419c49eb3f71637ccd58a431c1368d4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 14 Apr 2023 05:44:50 +0100 Subject: gentoo auto-resync : 14:04:2023 - 05:44:49 --- eclass/toolchain.eclass | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'eclass/toolchain.eclass') 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 -- cgit v1.2.3