commit: f26b21f78c91ba678c8f009d5439c05781f59993
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 21 10:41:48 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 21 10:42:42 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f26b21f7
toolchain.eclass: pass -O0 for stage1 when building an old GCC too
Not just when using an old GCC.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index cc8d7a5cd291..0f7ac98056c3 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2331,7 +2331,7 @@ gcc_do_make() {
# The last known issues are with < GCC 4.9 or so, but it's
easier
# to keep this bound somewhat fresh just to avoid problems.
Ultimately,
# using not-O0 is just a build-time speed improvement anyway.
- if ! tc-is-gcc || ver_test $(gcc-fullversion) -lt 10 ; then
+ if ! tc-is-gcc || ver_test $(gcc-fullversion) -lt 10 ||
ver_test ${PV} -lt 10 ; then
einfo "Resetting STAGE1_*FLAGS to -O0 because of old or
non-GCC bootstrap compiler"
STAGE1_CFLAGS="-O0"
STAGE1_CXXFLAGS="-O0"