summaryrefslogtreecommitdiffstats
path: root/support/scripts
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2017-06-30 10:37:07 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-02 15:49:25 +0200
commit824f3d9bebee5008ed4f21ab9857778b7d200802 (patch)
tree9e7b6301290669e52ed7912e4b65955148921fc2 /support/scripts
parent363ec9686d00ffb216567032e3dd2b274fcc6892 (diff)
downloadbuildroot-824f3d9bebee5008ed4f21ab9857778b7d200802.tar.gz
buildroot-824f3d9bebee5008ed4f21ab9857778b7d200802.zip
support/scripts: check-host-rpath now handles $ORIGIN as well
"$ORIGIN/../../usr/lib" is also a valid RPATH for binaries in "$hostdir/usr/bin". After RPATH sanitation, all RPATH directories start with "$ORIGIN". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts')
-rwxr-xr-xsupport/scripts/check-host-rpath2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
index 6ce547cb04..020c12379f 100755
--- a/support/scripts/check-host-rpath
+++ b/support/scripts/check-host-rpath
@@ -58,7 +58,7 @@ check_elf_has_rpath() {
for dir in ${rpath//:/ }; do
# Remove duplicate and trailing '/' for proper match
dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
- [ "${dir}" = "${hostdir}/usr/lib" ] && return 0
+ [ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0
done
done < <( readelf -d "${file}" \
|sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
OpenPOWER on IntegriCloud