aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/make.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index bdcfadea..bd550b91 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -12,7 +12,8 @@ source scripts/portability.sh
UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")"
# Try to keep one more cc invocation going than we have processors
-[ -z "$CPUS" ] && CPUS=$(($(nproc 2>/dev/null)+1))
+[ -z "$CPUS" ] && \
+ CPUS=$(($(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)+1))
# Respond to V= by echoing command lines as well as running them
DOTPROG=