diff options
author | Dan McGregor <dan.mcgregor@usask.ca> | 2017-03-02 04:22:13 (GMT) |
---|---|---|
committer | Dan McGregor <dan.mcgregor@usask.ca> | 2017-03-02 04:22:13 (GMT) |
commit | 6d1bcaa2f53dd540bbb85b5b98ee1422005cdc9e (patch) | |
tree | 46f493dc5b55f77031bf8b8300cc2622822e962e /scripts | |
parent | f2f782dd1cf2b4ccb6f28f6113e7fedb23f078d6 (diff) |
Use configure to find the processor count
configure.ac now finds how to count the CPUs in a system. Currently
the getconf method and sysctl methods are supported. Adding more is
easy enough.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 902c15d..2635e5f 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -534,7 +534,7 @@ if [ -z "${CT_RESTART}" ]; then fi # Use the number of processors+1 when automatically setting the number of # parallel jobs. Fall back to 1 if the host doesn't use GLIBC. - AUTO_JOBS=$((`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 0` + 1)) + AUTO_JOBS=$((`@@CT_cpucount@@ 2>/dev/null || echo 0` + 1)) [ ${CT_PARALLEL_JOBS} -eq 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}" [ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}" JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}" |