about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-04-01 22:22:59 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-04-06 16:36:29 -0400
commit433d5178ca50dd8225f5963b7cbec8da4ab70db9 (patch)
tree54e53f83a2f75346f91ea3642e9d8bc011e03d9a /pkgs/build-support
parent5256aa688f097363ca701e60ca567799b9fed603 (diff)
downloadnixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar.gz
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar.bz2
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar.lz
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar.xz
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.tar.zst
nixlib-433d5178ca50dd8225f5963b7cbec8da4ab70db9.zip
setup-hooks/auto-patchelf.sh: get prefixed readelf
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/auto-patchelf.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh
index 52c50091d08c..72970623ed79 100644
--- a/pkgs/build-support/setup-hooks/auto-patchelf.sh
+++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh
@@ -15,7 +15,7 @@ isExecutable() {
     # *or* there is an INTERP section. This also catches position-independent
     # executables, as they typically have an INTERP section but their ELF type
     # is DYN.
-    isExeResult="$(LANG=C readelf -h -l "$1" 2> /dev/null \
+    isExeResult="$(LANG=C $READELF -h -l "$1" 2> /dev/null \
         | grep '^ *Type: *EXEC\>\|^ *INTERP\>')"
     # not using grep -q, because it can cause Broken pipe
     [ -n "$isExeResult" ]
@@ -207,7 +207,7 @@ autoPatchelf() {
     # outside of this function.
     while IFS= read -r -d $'\0' file; do
       isELF "$file" || continue
-      segmentHeaders="$(LANG=C readelf -l "$file")"
+      segmentHeaders="$(LANG=C $READELF -l "$file")"
       # Skip if the ELF file doesn't have segment headers (eg. object files).
       # not using grep -q, because it can cause Broken pipe
       [ -n "$(echo "$segmentHeaders" | grep '^Program Headers:')" ] || continue