diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/oh-strip.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/oh-strip.sh b/src/oh-strip.sh index c03fb43..e5a34bf 100644 --- a/src/oh-strip.sh +++ b/src/oh-strip.sh @@ -78,15 +78,15 @@ while [ ${#} -gt 0 ]; do # from the original object file to the debugging object file. mkdir -p "$(dirname "dest/usr/lib/debug/${1}")" || \ error 'Cannot make directory path to debugging object' - objcopy --only-keep-debug --compress-debug-sections "dest/${1}" \ + ${OBJCOPY:-objcopy} --only-keep-debug --compress-debug-sections "dest/${1}" \ "dest/usr/lib/debug/${1}" || error 'Cannot make debugging object' - objcopy --add-gnu-debuglink="dest/usr/lib/debug/${1}" "dest/${1}" || \ + ${OBJCOPY:-objcopy} --add-gnu-debuglink="dest/usr/lib/debug/${1}" "dest/${1}" || \ error 'Cannot add GDB link' chmod 644 "dest/usr/lib/debug/${1}" || \ error 'Cannot set mode on debugging object' fi # Strip the object file of symbols. # TODO: If the file is not a library, strip it of all symbols. - strip -g "dest/${1}" || error 'Cannot strip object' + ${STRIP:-strip} -g "dest/${1}" || error 'Cannot strip object' shift done |