1 |
commit: 41811e6dccc06d1760e3ede11d638f01c947fef1 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 30 19:44:31 2023 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 30 19:44:31 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41811e6d |
7 |
|
8 |
sys-libs/glibc: Backport prefix sysroot change to stable version |
9 |
|
10 |
Sorry for changing the stable version, but I forgot to consider stable before |
11 |
publishing the news item. This only affects prefix anyway. |
12 |
|
13 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
14 |
|
15 |
sys-libs/glibc/glibc-2.36-r5.ebuild | 11 +++++++++++ |
16 |
1 file changed, 11 insertions(+) |
17 |
|
18 |
diff --git a/sys-libs/glibc/glibc-2.36-r5.ebuild b/sys-libs/glibc/glibc-2.36-r5.ebuild |
19 |
index ed09d00c8a98..5aa15579a204 100644 |
20 |
--- a/sys-libs/glibc/glibc-2.36-r5.ebuild |
21 |
+++ b/sys-libs/glibc/glibc-2.36-r5.ebuild |
22 |
@@ -1306,6 +1306,17 @@ glibc_do_src_install() { |
23 |
mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
24 |
fi |
25 |
|
26 |
+ # We configure toolchains for standalone prefix systems with a sysroot, |
27 |
+ # which is prepended to paths in ld scripts, so strip the prefix from these. |
28 |
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) |
29 |
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) |
30 |
+ if [[ -n $(host_eprefix) ]] ; then |
31 |
+ local file |
32 |
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do |
33 |
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die |
34 |
+ done |
35 |
+ fi |
36 |
+ |
37 |
# We'll take care of the cache ourselves |
38 |
rm -f "${ED}"/etc/ld.so.cache |