# HG changeset patch # User Rob Landley # Date 1416860757 21600 # Node ID b871f0e7b837eb9a21724fa345505b2b5dfbf8f2 # Parent 427a9002ab2a88c051e62d94a08c6484d35af30a Build the compiler wrapper static if possible, and only copy libraries into the simple-root-filesystem if we need them. diff -r 427a9002ab2a -r b871f0e7b837 simple-root-filesystem.sh --- a/simple-root-filesystem.sh Wed Nov 19 23:08:31 2014 -0600 +++ b/simple-root-filesystem.sh Mon Nov 24 14:25:57 2014 -0600 @@ -50,7 +50,7 @@ tar -c -C "$SIMPLE_ROOT_OVERLAY" . | tar -x -C "$STAGE_DIR" || dienow fi -# Build busybox +# Build toybox STAGE_DIR="$STAGE_USR" build_section busybox cp "$WORK"/config-busybox "$STAGE_USR"/src || dienow @@ -66,15 +66,19 @@ then "${ARCH}-cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS -static \ -o "$STAGE_USR/bin/hello-static" || dienow + STATIC=--static +else + STATIC= fi # Debug wrapper for use with /usr/src/record-commands.sh -"${ARCH}-cc" "$SOURCES/toys/wrappy.c" -Os $CFLAGS -o "$STAGE_USR/bin/record-commands-wrapper" || dienow +"${ARCH}-cc" "$SOURCES/toys/wrappy.c" -Os $CFLAGS $STATIC \ + -o "$STAGE_USR/bin/record-commands-wrapper" || dienow # Do we need shared libraries? -if [ "$BUILD_STATIC" != all ] +if ! is_in_list toybox $BUILD_STATIC || ! is_in_list busybox $BUILD_STATIC then echo Copying compiler libraries... mkdir -p "$STAGE_USR/lib" || dienow