call strip as $STRIP

This is useful e.g. for cross toolchains that define $CC and $STRIP
instead of $CROSS_COMPILE.
This commit is contained in:
Francesco Valla 2018-06-02 16:09:22 +02:00 committed by Rob Landley
parent 1e90addea7
commit 5efc1674a8
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@
HOSTCC?=cc
export CROSS_COMPILE CFLAGS OPTIMIZE LDOPTIMIZE CC HOSTCC V
export CROSS_COMPILE CFLAGS OPTIMIZE LDOPTIMIZE CC HOSTCC V STRIP
all: toybox

1
configure vendored
View File

@ -28,6 +28,7 @@ CFLAGS="$CFLAGS -funsigned-char"
# you call scripts/make.sh and friends directly.
[ -z "$CC" ] && CC=cc
[ -z "$STRIP" ] & STRIP=strip
# If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
# ala HOSTCC="blah-cc --static"

View File

@ -368,7 +368,7 @@ done
do_loudly $BUILD $LNKFILES $LINK || exit 1
if [ ! -z "$NOSTRIP" ] ||
! do_loudly ${CROSS_COMPILE}strip "$UNSTRIPPED" -o "$OUTNAME"
! do_loudly ${CROSS_COMPILE}${STRIP} "$UNSTRIPPED" -o "$OUTNAME"
then
echo "strip failed, using unstripped" && cp "$UNSTRIPPED" "$OUTNAME" ||
exit 1