aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-07-07 14:46:14 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-07-07 14:46:14 +0200
commit347143af0dce63ac4672ba5b4c9291c6a696e210 (patch)
tree6ff0574e91e66b52937ee0086689cbdb7b2df727 /include
parentd960c7440183d6f8666add05e81232dea5918e38 (diff)
downloadmaster-187ad058-347143af0dce63ac4672ba5b4c9291c6a696e210.tar.gz
master-187ad058-347143af0dce63ac4672ba5b4c9291c6a696e210.tar.bz2
master-187ad058-347143af0dce63ac4672ba5b4c9291c6a696e210.zip
build: don't add -j for parallel builds with Make 4.2+
Make usually passes -j and jobserver arguments as part of MAKEFLAGS. LEDE removes MAKEFLAGS to have better control of the build, and re-adds the jobserver arguments with -j to the Make commandline where desired. Make 4.2+ behave differently with these arguments passed on the commandline than in MAKEFLAGS: -j will override the jobserver argument and the job count will be unlimited. Moving the flags to MAKEFLAGS will need many packages to be changed and tested; therefore, we opt for a less invasive change for now and just remove -j for Make 4.2+, as the jobserver argument alone is enough to enable parallel builds for these Make versions. Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'include')
-rw-r--r--include/host-build.mk2
-rw-r--r--include/package.mk2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 456b418f86..a494ceddf3 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -10,7 +10,7 @@ HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install
HOST_BUILD_PARALLEL ?=
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
- HOST_MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
+ HOST_MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
else
HOST_MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
endif
diff --git a/include/package.mk b/include/package.mk
index ca315b59ac..4962bd68d1 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -17,7 +17,7 @@ PKG_USE_MIPS16 ?= 1
PKG_IREMAP ?= 1
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
- MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
+ MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
else
MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
endif