commit:     4439bf758dc2bfc1584f646c055ee54a1a6c2b43
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 23 14:38:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 23 14:40:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4439bf75

sys-libs/glibc: fix CPP definition

On sparc, this might break if e.g. -mcpu is in CFLAGS. It's similar to
the arm case already mentioned.

Reported by Dakon:
"ok, it greps for __sparc_v8 or __sparc_v9 cpp output, but it does not pass the 
-mcpu
I have in CFLAGS, so it falls back to the compiler default which still is v7"

Fixes: 30e32d9ed408fd786e9c1e16063c1228d123ebc1
Fixes: 39ba3e621469464a59dc7a37e3c41366d7856066
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/glibc/glibc-2.38-r12.ebuild | 2 +-
 sys-libs/glibc/glibc-2.39-r3.ebuild  | 2 +-
 sys-libs/glibc/glibc-9999.ebuild     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.38-r12.ebuild 
b/sys-libs/glibc/glibc-2.38-r12.ebuild
index aef3c5d5d479..88280475bb10 100644
--- a/sys-libs/glibc/glibc-2.38-r12.ebuild
+++ b/sys-libs/glibc/glibc-2.38-r12.ebuild
@@ -663,7 +663,7 @@ setup_env() {
        # Some of the tests are written in C++, so we need to force our multlib 
abis in, bug 623548
        export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
-       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS}"
+       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
        if is_crosscompile; then
                # Assume worst-case bootstrap: glibc is built for the first time

diff --git a/sys-libs/glibc/glibc-2.39-r3.ebuild 
b/sys-libs/glibc/glibc-2.39-r3.ebuild
index f53dac7811b7..1e6aadbb04e3 100644
--- a/sys-libs/glibc/glibc-2.39-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.39-r3.ebuild
@@ -676,7 +676,7 @@ setup_env() {
        # Some of the tests are written in C++, so we need to force our multlib 
abis in, bug 623548
        export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
-       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS}"
+       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
        if is_crosscompile; then
                # Assume worst-case bootstrap: glibc is built for the first time

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index c6fc206e2d4f..c3dce15e7e99 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -676,7 +676,7 @@ setup_env() {
        # Some of the tests are written in C++, so we need to force our multlib 
abis in, bug 623548
        export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
-       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS}"
+       export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}"
 
        if is_crosscompile; then
                # Assume worst-case bootstrap: glibc is built for the first time

Reply via email to