# HG changeset patch # User Rob Landley # Date 1411236473 18000 # Node ID 19435f12ec63b9cdc24761b2d74cae9c4a6edbe3 # Parent 434c4ae19f0559ab3ba6cd3d0a288b44c3c23949 Give library probe a progress indicator, and use 150% of detected CPUs to try to keep large SMP machines busy (each compiler invocation is short so they exit almost as fast as we launch them). diff -r 434c4ae19f05 -r 19435f12ec63 scripts/make.sh --- a/scripts/make.sh Thu Sep 18 18:07:58 2014 -0500 +++ b/scripts/make.sh Sat Sep 20 13:07:53 2014 -0500 @@ -9,7 +9,12 @@ [ -z "$KCONFIG_CONFIG" ] && KCONFIG_CONFIG=".config" -[ -z "$CPUS" ] && CPUS=$(($(echo /sys/devices/system/cpu/cpu[0-9]* | wc -w)+1)) +# Since each cc invocation is short, launch half again as many processes +# as we have processors so they don't exit faster than we can start them. +[ -z "$CPUS" ] && + CPUS=$((($(echo /sys/devices/system/cpu/cpu[0-9]* | wc -w)*3)/2)) + +echo CPUS=$CPUS # Respond to V= by echoing command lines as well as running them do_loudly() @@ -138,7 +143,7 @@ -o generated/config2help && \ generated/config2help Config.in $KCONFIG_CONFIG > generated/help.h || exit 1 -echo "Library probe..." +echo -n "Library probe" # We trust --as-needed to remove each library if we don't use any symbols # out of it, this loop is because the compiler has no way to ignore a library @@ -151,7 +156,9 @@ echo "int main(int argc, char *argv[]) {return 0;}" | \ ${CROSS_COMPILE}${CC} $CFLAGS -xc - -o /dev/null -Wl,--as-needed -l$i > /dev/null 2>/dev/null && echo -l$i >> generated/optlibs.dat + echo -n . done +echo echo -n "Compile toybox" [ ! -z "$V" ] && echo