commit:     5025a353887de4e70e4ac960f9ec2051b387e1e2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 11:58:41 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 12:01:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5025a353

scripts/bootstrap-prefix: force CXXFLAGS for GCC to find our includes

GCC apparently at some point stops looking at CPPFLAGS, which causes it
not to "see" our includes.  So, use CXXFLAGS isntead while we don't have
helpers to make this work.

Bug: https://bugs.gentoo.org/778014
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 2ccb649216..c7bf16eedb 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1935,9 +1935,13 @@ bootstrap_stage2() {
        for pkg in ${compiler_stage1} ; do
                # <glibc-2.5 does not understand .gnu.hash, use
                # --hash-style=both to produce also sysv hash.
+               # GCC apparently drops CPPFLAGS at some point, which makes it
+               # not find things like gmp which we just installed, so force it
+               # to find our prefix
                EXTRA_ECONF="--disable-bootstrap $(rapx 
--with-linker-hash-style=both) --with-local-prefix=${ROOT}" \
                MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \
                GCC_MAKE_TARGET=all \
+               OVERRIDE_CXXFLAGS="${CPPFLAGS} -O2 -pipe" \
                TPREFIX="${ROOT}" \
                PYTHON_COMPAT_OVERRIDE=python${PYTHONMAJMIN} \
                emerge_pkgs --nodeps ${pkg} || return 1

Reply via email to