From 6cd30d42a462786d3d7c014a766a5c366982d83a Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 14 Mar 2012 02:37:38 -0400 Subject: Refer to GNU Binutils programs by variable value. --- (limited to 'src') 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 -- cgit v0.9.1