From 6d1bcaa2f53dd540bbb85b5b98ee1422005cdc9e Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Wed, 1 Mar 2017 22:22:13 -0600 Subject: 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 --- scripts/crosstool-NG.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 902c15d2..2635e5f2 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}" -- cgit v1.2.3