From c214c727f60b070aa502b20dcc1ad7e3ce8579f2 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 18 Jun 2020 19:30:25 -0400 Subject: oh-shlibdeps: Hardcode lib dirs, drop ldconfig --- diff --git a/Makefile.am b/Makefile.am index aaf1564..11755af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,7 +70,6 @@ do_subst = sed \ -e 's|[@]SH[@]|$(SH)|g' \ -e 's|[@]READELF[@]|$(READELF)|g' \ -e 's|[@]OPKG[@]|$(OPKG)|g' \ - -e 's|[@]LDCONFIG[@]|$(LDCONFIG)|g' \ -e 's|[@]multiarch_libdir[@]|$(multiarch_libdir)|g' \ -e 's|[@]library_path[@]|$(library_path)|g' \ -e 's|[@]bindir[@]|$(bindir)|g' \ diff --git a/NEWS b/NEWS index 88197f1..5b9d9b6 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,13 @@ opkhelper version 3.1.2+dev Released: ????-??-?? +Changes in this release: + + * oh-shlibdeps now searches a hardcoded list of host architecture + library directories, instead of using ldconfig. ldconfig is + specific to glibc and provides library search directories for the + build architecture, which are incorrect when cross building. + opkhelper version 3.1.2 ----------------------- diff --git a/configure.ac b/configure.ac index cd54608..1f1c030 100644 --- a/configure.ac +++ b/configure.ac @@ -97,31 +97,6 @@ AC_ARG_WITH( ] ) -AC_ARG_WITH( - [ldconfig], - [AS_HELP_STRING([--with-ldconfig=PATH], [path to ldconfig])], - [ - case "${withval}" in - 'yes'|'') - AC_MSG_ERROR( - [--with-ldconfig requires an argument]) - ;; - 'no') - AC_MSG_ERROR([ldconfig is required]) - ;; - *) - LDCONFIG="${withval}" - ;; - esac - ], - [ - AC_PATH_PROG([LDCONFIG], [ldconfig]) - if test -z "${LDCONFIG}"; then - AC_MSG_ERROR([ldconfig not found]) - fi - ] -) - AC_ARG_ENABLE( [multiarch-libdir], [AS_HELP_STRING( diff --git a/src/oh-shlibdeps.sh b/src/oh-shlibdeps.sh index 86ff114..910b194 100644 --- a/src/oh-shlibdeps.sh +++ b/src/oh-shlibdeps.sh @@ -31,8 +31,11 @@ find_lib() local pkg= local dir= - rtld_dirs="$(@LDCONFIG@ -v 2>/dev/null | \ - sed -n 's/^\([^\t].*\):$/\1/p')" + if [ '@multiarch_libdir@' = 'yes' ]; then + rtld_dirs="/lib/${OPK_HOST_ARCH} /usr/lib/${OPK_HOST_ARCH}" + else + rtld_dirs='/lib /usr/lib' + fi # Check just-built packages. for pkg in *.data/; do -- cgit v0.9.1