1 |
commit: 838f2e1228f33a1ef2fabae97cd18d8117b4a72d |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 5 15:31:30 2021 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 5 15:32:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=838f2e12 |
7 |
|
8 |
sys-libs/glibc: Add experimental clang-kicking |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org> |
12 |
|
13 |
sys-libs/glibc/glibc-9999.ebuild | 27 ++++++++++++++++++++++++++- |
14 |
1 file changed, 26 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild |
17 |
index f5422fcf72cb..39b77e312fa5 100644 |
18 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
19 |
+++ b/sys-libs/glibc/glibc-9999.ebuild |
20 |
@@ -819,7 +819,32 @@ glibc_do_configure() { |
21 |
# we accumulate crap across abis |
22 |
unset CXX |
23 |
|
24 |
- einfo "Configuring glibc for nptl" |
25 |
+ # If we are running in an otherwise clang/llvm environment, we need to |
26 |
+ # recover the proper gcc and binutils settings here, at least until glibc |
27 |
+ # is finally building with clang. So let's override everything that is |
28 |
+ # set in the clang profiles. |
29 |
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always |
30 |
+ # a good start into that direction. |
31 |
+ if tc-is-clang && ! use custom-cflags ; then |
32 |
+ local current_binutils_path=$(binutils-config -B) |
33 |
+ local current_gcc_path=$(gcc-config -B) |
34 |
+ einfo "Overriding clang configuration, since it won't work here" |
35 |
+ |
36 |
+ export CC="${current_gcc_path}/gcc" |
37 |
+ export LD="${current_binutils_path}/ld.bfd" |
38 |
+ export AR="${current_binutils_path}/ar" |
39 |
+ export AS="${current_binutils_path}/as" |
40 |
+ export NM="${current_binutils_path}/nm" |
41 |
+ export STRIP="${current_binutils_path}/strip" |
42 |
+ export RANLIB="${current_binutils_path}/ranlib" |
43 |
+ export OBJCOPY="${current_binutils_path}/objcopy" |
44 |
+ export STRINGS="${current_binutils_path}/strings" |
45 |
+ export OBJDUMP="${current_binutils_path}/objdump" |
46 |
+ export READELF="${current_binutils_path}/readelf" |
47 |
+ export ADDR2LINE="${current_binutils_path}/addr2line" |
48 |
+ |
49 |
+ # do we need to also do flags munging here? |
50 |
+ fi |
51 |
|
52 |
if use doc ; then |
53 |
export MAKEINFO=makeinfo |