commit:     7040530e1c792a2e6e8f36969c408459f9338bde
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 18 09:27:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 18 09:27:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7040530e

toolchain.eclass: only show checking warning w/ USE=-debug

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8fe3cde2a69f..deedb1867816 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1185,11 +1185,13 @@ toolchain_src_configure() {
                if grep -q "experimental" gcc/DEV-PHASE ; then
                        # Tell users about the non-obvious behavior here so 
they don't think
                        # e.g. the next GCC release is super slow to compile 
things.
-                       ewarn "Unreleased GCCs default to extra runtime checks 
even with USE=-debug,"
-                       ewarn "matching upstream default behavior. We recommend 
keeping these enabled."
-                       ewarn "The checks (sometimes substantially) increase 
build time but provide important protection"
-                       ewarn "from potential miscompilations (wrong code) by 
turning them into build-time errors."
-                       ewarn "To override (not recommended), set: 
GCC_CHECKS_LIST=\"release\"."
+                       if ! use debug ; then
+                               ewarn "Unreleased GCCs default to extra runtime 
checks even with USE=-debug,"
+                               ewarn "matching upstream default behavior. We 
recommend keeping these enabled."
+                               ewarn "The checks (sometimes substantially) 
increase build time but provide important protection"
+                               ewarn "from potential miscompilations (wrong 
code) by turning them into build-time errors."
+                               ewarn "To override (not recommended), set: 
GCC_CHECKS_LIST=\"release\"."
+                       fi
 
                        # - USE=debug for pre-releases: yes,extra,rtl (stornger 
than USE=debug for releases)
                        # - USE=-debug for pre-releases: yes,extra (following 
upstream default)

Reply via email to