summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2021-12-05 16:31:30 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-12-05 16:32:00 +0100
commit838f2e1228f33a1ef2fabae97cd18d8117b4a72d (patch)
tree6fcc1597913ba81f3b130bc9e9e00acac0a9c0e3 /sys-libs
parentprofiles: clang feature: drop mask of new clang, this problem is actually solved (diff)
downloadgentoo-838f2e1228f33a1ef2fabae97cd18d8117b4a72d.tar.gz
gentoo-838f2e1228f33a1ef2fabae97cd18d8117b4a72d.tar.bz2
gentoo-838f2e1228f33a1ef2fabae97cd18d8117b4a72d.zip
sys-libs/glibc: Add experimental clang-kicking
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild27
1 files changed, 26 insertions, 1 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index f5422fcf72cb..39b77e312fa5 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -819,7 +819,32 @@ glibc_do_configure() {
# we accumulate crap across abis
unset CXX
- einfo "Configuring glibc for nptl"
+ # If we are running in an otherwise clang/llvm environment, we need to
+ # recover the proper gcc and binutils settings here, at least until glibc
+ # is finally building with clang. So let's override everything that is
+ # set in the clang profiles.
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
+ # a good start into that direction.
+ if tc-is-clang && ! use custom-cflags ; then
+ local current_binutils_path=$(binutils-config -B)
+ local current_gcc_path=$(gcc-config -B)
+ einfo "Overriding clang configuration, since it won't work here"
+
+ export CC="${current_gcc_path}/gcc"
+ export LD="${current_binutils_path}/ld.bfd"
+ export AR="${current_binutils_path}/ar"
+ export AS="${current_binutils_path}/as"
+ export NM="${current_binutils_path}/nm"
+ export STRIP="${current_binutils_path}/strip"
+ export RANLIB="${current_binutils_path}/ranlib"
+ export OBJCOPY="${current_binutils_path}/objcopy"
+ export STRINGS="${current_binutils_path}/strings"
+ export OBJDUMP="${current_binutils_path}/objdump"
+ export READELF="${current_binutils_path}/readelf"
+ export ADDR2LINE="${current_binutils_path}/addr2line"
+
+ # do we need to also do flags munging here?
+ fi
if use doc ; then
export MAKEINFO=makeinfo