OSDN Git Service

Yank $STRIP from config (and STRIP=no weirdness) and just allow strip to fail.
authorRob Landley <rob@landley.net>
Fri, 6 Mar 2015 21:11:38 +0000 (15:11 -0600)
committerRob Landley <rob@landley.net>
Fri, 6 Mar 2015 21:11:38 +0000 (15:11 -0600)
configure
scripts/make.sh

index 59a30dc..21d56f3 100644 (file)
--- a/configure
+++ b/configure
@@ -16,7 +16,6 @@ CFLAGS="$CFLAGS -funsigned-char"
 [ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
 
 [ -z "$CC" ] && CC=cc
-[ -z "$STRIP" ] && STRIP=strip  # set STRIP=no to skip stripping entirely
 
 # If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
 # ala HOSTCC="blah-cc --static"
index 9e4b83e..4cb1927 100755 (executable)
@@ -268,11 +268,10 @@ done
 [ $DONE -ne 0 ] && exit 1
 
 do_loudly $BUILD $LFILES $LINK || exit 1
-if [ "$STRIP" == no ]
+if ! do_loudly ${CROSS_COMPILE}strip toybox_unstripped -o toybox
 then
-  mv toybox_unstripped toybox
-else
-  do_loudly ${CROSS_COMPILE}${STRIP} toybox_unstripped -o toybox || exit 1
+  echo "strip failed, using unstripped" && cp toybox_unstripped toybox ||
+  exit 1
 fi
 # gcc 4.4's strip command is buggy, and doesn't set the executable bit on
 # its output the way SUSv4 suggests it do so.