Skip to content
Snippets Groups Projects
Unverified Commit 6fb212f2 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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: default avatarJo-Philipp Wich <jo@mein.io>
Signed-off-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
parent e2a9c638
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install ...@@ -10,7 +10,7 @@ HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install
HOST_BUILD_PARALLEL ?= HOST_BUILD_PARALLEL ?=
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),) 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 else
HOST_MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS) HOST_MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
endif endif
......
...@@ -17,7 +17,7 @@ PKG_USE_MIPS16 ?= 1 ...@@ -17,7 +17,7 @@ PKG_USE_MIPS16 ?= 1
PKG_IREMAP ?= 1 PKG_IREMAP ?= 1
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),) 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 else
MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS) MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
endif endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment