commit:     58fc4051affdec8d2c5560654c1fce8b2fe15b8e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 10 09:22:41 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 10 09:27:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58fc4051

toolchain.eclass: pass -Wno-array-bounds in STAGE1_GDCFLAGS

Bug: https://bugs.gentoo.org/940750
Signed-off-by: Sam James <sam <AT> gentoo.org>

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

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 933292d6ee2a..273a2b9f92c9 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2132,11 +2132,6 @@ gcc_do_filter_flags() {
                filter-flags 
-fdiagnostics-set-output=text:experimental-nesting=yes
        fi
 
-       if is_d ; then
-               # bug #940750
-               filter-flags -Warray-bounds
-       fi
-
        # Please use USE=lto instead (bug #906007).
        filter-lto
 
@@ -2332,13 +2327,18 @@ gcc_do_make() {
                BOOT_LDFLAGS=${BOOT_LDFLAGS-"${abi_ldflags} ${LDFLAGS}"}
                LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}"
 
-               # If we need to in future, we could really simplify this
-               # to just be unconditional for stage1. It doesn't really
-               # matter there. If we want to go in the other direction
-               # and make this more conditional, we could check if
-               # the bootstrap compiler is < GCC 12. See bug #940470.
-               if _tc_use_if_iuse d && use hardened ; then
-                       STAGE1_CXXFLAGS+=" -U_GLIBCXX_ASSERTIONS"
+               if _tc_use_if_iuse d ; then
+                       # If we need to in future, we could really simplify this
+                       # to just be unconditional for stage1. It doesn't really
+                       # matter there. If we want to go in the other direction
+                       # and make this more conditional, we could check if
+                       # the bootstrap compiler is < GCC 12. See bug #940470.
+                       if use hardened ; then
+                               STAGE1_CXXFLAGS+=" -U_GLIBCXX_ASSERTIONS"
+                       fi
+
+                       # This can be dropped a while after 2025-03-31 (bug 
#940750).
+                       STAGE1_GDCFLAGS+=" -Wno-array-bounds"
                fi
 
                emakeargs+=(

Reply via email to