diff options
author | Zac Medico <zmedico@gentoo.org> | 2020-03-29 11:09:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2020-04-07 23:02:45 -0700 |
commit | 25fbe7bc1a92a6877f2fecfba93ac932f359ce2f (patch) | |
tree | 72279563375e066aa20016dd0e57ed2bc71c8c9a /bin | |
parent | Revert "AsynchronousTask: add coroutine async_start method" (diff) | |
download | portage-25fbe7bc1a92a6877f2fecfba93ac932f359ce2f.tar.gz portage-25fbe7bc1a92a6877f2fecfba93ac932f359ce2f.tar.bz2 portage-25fbe7bc1a92a6877f2fecfba93ac932f359ce2f.zip |
NeededEntry: infer implicit soname from file basename (bug 715162)
For dynamic libraries, infer an implicit DT_SONAME setting from the
file basename, which is consistent with dynamic linking behavior in
practice. This makes it possible to resolve soname dependencies for
musl's libc.so which lacks a DT_SONAME setting.
Bug: https://bugs.gentoo.org/715162
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/misc-functions.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 4f8a4112d..9efe99b87 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -183,6 +183,12 @@ install_qa_check() { soname=${l%%;*}; l=${l#*;} rpath=${l%%;*}; l=${l#*;}; [ "${rpath}" = " - " ] && rpath="" needed=${l%%;*}; l=${l#*;} + + # Infer implicit soname from basename (bug 715162). + if [[ -z ${soname} && $(file "${D%/}${obj}") == *"SB shared object"* ]]; then + soname=${obj##*/} + fi + echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2 done } |