scale the max load by the number of CPUs (issue #131)

This commit is contained in:
Trammell Hudson 2017-04-06 10:50:43 -04:00
parent 830828f2a2
commit 192e122719
Failed to extract signature
2 changed files with 12 additions and 5 deletions

View File

@ -7,7 +7,8 @@ INSTALL := $(pwd)/install
log_dir := $(build)/log
# Controls how many parallel jobs are invoked in subshells
MAKE_JOBS ?= -j8 --max-load 24
CPUS := $(shell nproc)
MAKE_JOBS ?= -j$(CPUS) --max-load 16
# Create the log directory if it doesn't already exist
BUILD_LOG := $(shell [ -d "$(log_dir)" ] || mkdir -p "$(log_dir)")

View File

@ -1,6 +1,7 @@
diff -r c004067a7b34 config.sh
--- a/config.sh Sun Oct 02 20:51:04 2016 -0400
+++ b/config.sh Fri Jan 27 17:47:25 2017 -0500
diff --git a/config.sh b/config.sh
index 4e321c9..336c65b 100644
--- a/config.sh
+++ b/config.sh
@@ -1,13 +1,15 @@
# ARCH will be auto-detected as the host if not specified
#ARCH=i486
@ -19,7 +20,12 @@ diff -r c004067a7b34 config.sh
# If you use arm, you may need more fine-tuning:
# arm hardfloat v7
@@ -24,3 +26,6 @@
@@ -20,7 +22,10 @@ CC_BASE_PREFIX=/opt/cross
#GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv7-a --with-float=softfp"
#GCC_CONFFLAGS="--with-arch=armv7-a --with-float=softfp"
-MAKEFLAGS=-j8
+MAKEFLAGS := -j`nproc`
# Enable this to build the bootstrap gcc (thrown away) without optimization, to reduce build time
GCC_STAGE1_NOOPT=1