From 564b130fd1bc8a35ac4d673d5211654c49af3fda Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 10 Apr 2023 23:55:34 +0100 Subject: 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 --- eclass/toolchain.eclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'eclass/toolchain.eclass') 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 -- cgit v1.2.3-65-gdbad