# HG changeset patch # User Rob Landley # Date 1409438647 18000 # Node ID 5f9fbf75ad34370f03c21b09559ecaa536868064 # Parent 0089cd84afeab10ca2f806d26ac1aa6e2410b9d5 Old compilers complain about linker options passed with -c, so split out $LDOPTIMIZE. diff -r 0089cd84afea -r 5f9fbf75ad34 configure --- a/configure Sat Aug 30 16:34:46 2014 -0500 +++ b/configure Sat Aug 30 17:44:07 2014 -0500 @@ -8,7 +8,8 @@ # Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned. CFLAGS="$CFLAGS -funsigned-char" -[ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -fno-asynchronous-unwind-tables" +[ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables" +[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections" [ -z "$CC" ] && CC=cc [ -z "$STRIP" ] && STRIP=strip diff -r 0089cd84afea -r 5f9fbf75ad34 scripts/make.sh --- a/scripts/make.sh Sat Aug 30 16:34:46 2014 -0500 +++ b/scripts/make.sh Sat Aug 30 17:44:07 2014 -0500 @@ -180,7 +180,7 @@ BUILD="${CROSS_COMPILE}${CC} $CFLAGS -I . $OPTIMIZE" FILES="$(ls lib/*.c) main.c $TOYFILES" -LINK="-o toybox_unstripped -Wl,--as-needed $(cat generated/optlibs.dat)" +LINK="$LDOPTIMIZE -o toybox_unstripped -Wl,--as-needed $(cat generated/optlibs.dat)" # This is a parallel version of: do_loudly $BUILD $FILES $LINK || exit 1