summaryrefslogtreecommitdiff
path: root/sys-libs/glibc/glibc-2.36-r5.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-30 20:59:34 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-30 20:59:34 +0000
commit182063dd85a03f2086258946276c8967945ffe95 (patch)
tree94440d3476f11273b5072685640990ec95042468 /sys-libs/glibc/glibc-2.36-r5.ebuild
parent268511f85b0606dd23fda1991345568dd3e1976b (diff)
gentoo auto-resync : 30:01:2023 - 20:59:33
Diffstat (limited to 'sys-libs/glibc/glibc-2.36-r5.ebuild')
-rw-r--r--sys-libs/glibc/glibc-2.36-r5.ebuild11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-2.36-r5.ebuild b/sys-libs/glibc/glibc-2.36-r5.ebuild
index ed09d00c8a98..5aa15579a204 100644
--- a/sys-libs/glibc/glibc-2.36-r5.ebuild
+++ b/sys-libs/glibc/glibc-2.36-r5.ebuild
@@ -1306,6 +1306,17 @@ glibc_do_src_install() {
mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
fi
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
# We'll take care of the cache ourselves
rm -f "${ED}"/etc/ld.so.cache