scripts/crosstool-NG.sh.in
changeset 2695 f2495884ca3e
parent 2653 e5fc5c9ea78a
child 2701 99de89e9acba
     1.1 --- a/scripts/crosstool-NG.sh.in	Wed Sep 07 01:22:37 2011 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Thu Sep 29 12:40:42 2011 +1300
     1.3 @@ -488,7 +488,11 @@
     1.4  
     1.5      # And help make go faster
     1.6      JOBSFLAGS=
     1.7 -    [ ${CT_PARALLEL_JOBS} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
     1.8 +    # Use the number of processors+1 when automatically setting the number of
     1.9 +    # parallel jobs.  Fall back to 1 if the host doesn't use GLIBC.
    1.10 +    AUTO_JOBS=$((`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 0` + 1))
    1.11 +    [ ${CT_PARALLEL_JOBS} -eq -1 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
    1.12 +    [ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
    1.13      [ ${CT_LOAD} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
    1.14  
    1.15      # We need to save the real .config with kconfig's value,