aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-05-09 15:07:17 -0700
committerZac Medico <zmedico@gentoo.org>2020-05-24 15:15:24 -0700
commit0bd5b693ef12c266000aafeb9557c1437fdfc1b2 (patch)
tree1c58c31400ef557a1d1a2ddd02ea4b3622c3adf1 /bin
parentRevert "doebuild: Use ccache/distcc/icecream only in src_* phases" (diff)
downloadportage-0bd5b693ef12c266000aafeb9557c1437fdfc1b2.tar.gz
portage-0bd5b693ef12c266000aafeb9557c1437fdfc1b2.tar.bz2
portage-0bd5b693ef12c266000aafeb9557c1437fdfc1b2.zip
NeededEntry: don't use scanelf -q (bug 721336)
We don't use scanelf -q, since that would omit libraries like musl's /usr/lib/libc.so which do not have any DT_NEEDED or DT_SONAME settings. Since we don't use scanelf -q, we have to handle the special rpath value " - ". Bug: https://bugs.gentoo.org/721336 Fixes: 25fbe7bc1a92 ("NeededEntry: infer implicit soname from file basename (bug 715162)") Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 9efe99b87..c2a16cbe0 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -177,7 +177,11 @@ install_qa_check() {
if type -P scanelf > /dev/null ; then
# Save NEEDED information after removing self-contained providers
rm -f "$PORTAGE_BUILDDIR"/build-info/NEEDED{,.ELF.2}
- scanelf -qyRF '%a;%p;%S;%r;%n' "${D%/}/" | { while IFS= read -r l; do
+ # We don't use scanelf -q, since that would omit libraries like
+ # musl's /usr/lib/libc.so which do not have any DT_NEEDED or
+ # DT_SONAME settings. Since we don't use scanelf -q, we have to
+ # handle the special rpath value " - " below.
+ scanelf -yRBF '%a;%p;%S;%r;%n' "${D%/}/" | { while IFS= read -r l; do
arch=${l%%;*}; l=${l#*;}
obj="/${l%%;*}"; l=${l#*;}
soname=${l%%;*}; l=${l#*;}