patchELF: Use correct directory

Borrowed from https://github.com/NixOS/nixpkgs/pull/13395.
This commit is contained in:
Eelco Dolstra 2016-02-24 11:13:36 +01:00
parent 2f050b5d13
commit aff0451c10
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,8 @@
fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi') fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi')
patchELF() { patchELF() {
header "shrinking RPATHs of ELF executables and libraries in $prefix" local dir="$1"
header "shrinking RPATHs of ELF executables and libraries in $dir"
local i local i
while IFS= read -r -d $'\0' i; do while IFS= read -r -d $'\0' i; do
@ -13,7 +14,7 @@ patchELF() {
if ! isELF "$i"; then continue; fi if ! isELF "$i"; then continue; fi
echo "shrinking $i" echo "shrinking $i"
patchelf --shrink-rpath "$i" || true patchelf --shrink-rpath "$i" || true
done < <(find "$prefix" -type f -print0) done < <(find "$dir" -type f -print0)
stopNest stopNest
} }