misc setup-hooks: Use env vars to refer to binutils programs

This is more robust for cross-compilation
This commit is contained in:
John Ericson
2017-12-13 16:08:18 -05:00
parent 91ca46f693
commit b8a21aa918
3 changed files with 5 additions and 5 deletions
@@ -25,7 +25,7 @@ _linkDLLs() {
linkCount=0
# Iterate over any DLL that we depend on.
local dll
for dll in $(objdump -p *.{exe,dll} | sed -n 's/.*DLL Name: \(.*\)/\1/p' | sort -u); do
for dll in $($OBJDUMP -p *.{exe,dll} | sed -n 's/.*DLL Name: \(.*\)/\1/p' | sort -u); do
if [ -e "./$dll" ]; then continue; fi
# Locate the DLL - it should be an *executable* file on $DLLPATH.
local dllPath="$(PATH="$DLLPATH" type -P "$dll")"