1.1 --- a/config/global/build-behave.in Thu Sep 29 12:27:54 2011 +1300
1.2 +++ b/config/global/build-behave.in Thu Sep 29 12:40:42 2011 +1300
1.3 @@ -16,6 +16,8 @@
1.4
1.5 Enter 1 (or 0) to have only one job at a time.
1.6
1.7 + Enter -1 to set automatically based on how many processors the host has.
1.8 +
1.9 config LOAD
1.10 int
1.11 prompt "Maximum allowed load" if ! BACKEND
2.1 --- a/scripts/crosstool-NG.sh.in Thu Sep 29 12:27:54 2011 +1300
2.2 +++ b/scripts/crosstool-NG.sh.in Thu Sep 29 12:40:42 2011 +1300
2.3 @@ -488,7 +488,11 @@
2.4
2.5 # And help make go faster
2.6 JOBSFLAGS=
2.7 - [ ${CT_PARALLEL_JOBS} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
2.8 + # Use the number of processors+1 when automatically setting the number of
2.9 + # parallel jobs. Fall back to 1 if the host doesn't use GLIBC.
2.10 + AUTO_JOBS=$((`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 0` + 1))
2.11 + [ ${CT_PARALLEL_JOBS} -eq -1 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
2.12 + [ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
2.13 [ ${CT_LOAD} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
2.14
2.15 # We need to save the real .config with kconfig's value,