changeset 1198:78e786334c5b

Polish the strip logic a bit.
author Rob Landley <rob@landley.net>
date Sun, 08 Aug 2010 21:01:41 -0500
parents 8b1017be9de8
children 9211775aea66
files root-filesystem.sh simple-root-filesystem.sh
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/root-filesystem.sh	Sun Aug 08 20:57:58 2010 -0500
+++ b/root-filesystem.sh	Sun Aug 08 21:01:41 2010 -0500
@@ -27,4 +27,12 @@
 yes 'n' | cp -ia "$BUILD/native-compiler-$ARCH/." \
   "$BUILD/root-filesystem-$ARCH$USRDIR" 2>/dev/null || dienow
 
+# Strip everything again, just to be sure.
+
+if [ -z "$SKIP_STRIP" ]
+then
+  "${ARCH}-strip" --strip-unneeded "$STAGE_DIR"/lib/*.so
+  "${ARCH}-strip" "$STAGE_DIR"/{bin/*,sbin/*}
+fi
+
 create_stage_tarball
--- a/simple-root-filesystem.sh	Sun Aug 08 20:57:58 2010 -0500
+++ b/simple-root-filesystem.sh	Sun Aug 08 21:01:41 2010 -0500
@@ -83,15 +83,15 @@
      "$("$ARCH-cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \
       "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_DIR/lib/$FILE"' \
       || dienow) | dotprogress
+
+  [ -z "$SKIP_STRIP" ] &&
+    "${ARCH}-strip" --strip-unneeded "$STAGE_DIR"/lib/*.so
 fi
 
 # Clean up and package the result
 
-if [ -z "$SKIP_STRIP" ]
-then
-  "${ARCH}-strip" "$STAGE_DIR"/{bin/*,sbin/*,libexec/gcc/*/*/*}
-  "${ARCH}-strip" --strip-unneeded "$STAGE_DIR"/lib/*.so
-fi
+[ -z "$SKIP_STRIP" ] &&
+  "${ARCH}-strip" "$STAGE_DIR"/{bin/*,sbin/*}
 
 create_stage_tarball