commit:     3588625fe514077e4a0a9a6a8141f00f840eca8e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 11:31:41 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 16:57:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3588625f

sys-libs/glibc: Improve clang override

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-libs/glibc/glibc-2.34-r10.ebuild | 6 ++++--
 sys-libs/glibc/glibc-2.35.ebuild     | 6 ++++--
 sys-libs/glibc/glibc-9999.ebuild     | 6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.34-r10.ebuild 
b/sys-libs/glibc/glibc-2.34-r10.ebuild
index 655a41a7f00c..e5b596095245 100644
--- a/sys-libs/glibc/glibc-2.34-r10.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r10.ebuild
@@ -525,9 +525,11 @@ setup_env() {
                # a good start into that direction.
                # Also, if you're crosscompiling, let's assume you know what 
you are doing.
                # Hopefully.
+               # Last, we need the settings of the *build* environment, not of 
the
+               # target environment...
 
-               local current_binutils_path=$(binutils-config -B)
-               local current_gcc_path=$(gcc-config -B)
+               local current_binutils_path=$(env ROOT="${SYSROOT}" 
binutils-config -B)
+               local current_gcc_path=$(env ROOT="${SYSROOT}" gcc-config -B)
                einfo "Overriding clang configuration, since it won't work here"
 
                export CC="${current_gcc_path}/gcc"

diff --git a/sys-libs/glibc/glibc-2.35.ebuild b/sys-libs/glibc/glibc-2.35.ebuild
index 014bac6b2005..0237132b9373 100644
--- a/sys-libs/glibc/glibc-2.35.ebuild
+++ b/sys-libs/glibc/glibc-2.35.ebuild
@@ -515,9 +515,11 @@ setup_env() {
                # a good start into that direction.
                # Also, if you're crosscompiling, let's assume you know what 
you are doing.
                # Hopefully.
+               # Last, we need the settings of the *build* environment, not of 
the
+               # target environment...
 
-               local current_binutils_path=$(binutils-config -B)
-               local current_gcc_path=$(gcc-config -B)
+               local current_binutils_path=$(env ROOT="${SYSROOT}" 
binutils-config -B)
+               local current_gcc_path=$(env ROOT="${SYSROOT}" gcc-config -B)
                einfo "Overriding clang configuration, since it won't work here"
 
                export CC="${current_gcc_path}/gcc"

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 2a26162f17d2..f9c41f6d8ccc 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -515,9 +515,11 @@ setup_env() {
                # a good start into that direction.
                # Also, if you're crosscompiling, let's assume you know what 
you are doing.
                # Hopefully.
+               # Last, we need the settings of the *build* environment, not of 
the
+               # target environment...
 
-               local current_binutils_path=$(binutils-config -B)
-               local current_gcc_path=$(gcc-config -B)
+               local current_binutils_path=$(env ROOT="${SYSROOT}" 
binutils-config -B)
+               local current_gcc_path=$(env ROOT="${SYSROOT}" gcc-config -B)
                einfo "Overriding clang configuration, since it won't work here"
 
                export CC="${current_gcc_path}/gcc"

Reply via email to