From 838f2e1228f33a1ef2fabae97cd18d8117b4a72d Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sun, 5 Dec 2021 16:31:30 +0100 Subject: sys-libs/glibc: Add experimental clang-kicking Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andreas K. Huettel --- sys-libs/glibc/glibc-9999.ebuild | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'sys-libs') 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 -- cgit v1.2.3-65-gdbad