From: Szymon Acedański <ac...@whiptronics.com>
When running with CONFIG_PKG_BUILD_USE_JOBSERVER=y (which is the
default), PKG_JOBS is defined as '--jobserver-fds=2,3 -j'. This
way bjam gets the '-j' option, which is invalid (a number of
jobs should follow).
This patch fixes this by not passing '-j' at all if
CONFIG_PKG_BUILD_USE_JOBSERVER=y.
Tested this change myself with CONFIG_PKG_BUILD_USE_JOBSERVER=y
and with CONFIG_PKG_BUILD_USE_JOBSERVER=n, running with 'make -j6'
and observing top. Also tested with CONFIG_PKG_BUILD_PARALLEL=n
and 'make'.
Signed-off-by: Szymon Acedański <ac...@whiptronics.com>
---
(resending because the patch didn't get through to
openwrt-devel@lists.openwrt.org, because I wasn't
subscribed; I'm sorry for this)
diff --git a/libs/boost/Makefile b/libs/boost/Makefile
index 832fc57..3e69e3d 100644
--- a/libs/boost/Makefile
+++ b/libs/boost/Makefile
@@ -184,6 +184,13 @@ endef
CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
TARGET_LDFLAGS += -pthread -lrt
+BJAM_JOBS := $(filter -j%,$(PKG_JOBS))
+# Do not try to extract the number of parallel jobs to run if the main
+# Makefile uses the jobserver, which is not supported by bjam.
+ifeq ($(BJAM_JOBS),-j)
+ BJAM_JOBS :=
+endif
+
define Build/Compile
+( cd $(PKG_BUILD_DIR) ; \
echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc :
<compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\"
<linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/v2/user-config.jam ; \
@@ -193,7 +200,7 @@ define Build/Compile
) \
bjam \
'-sBUILD=release <optimization>space
<inlining>on <debug-symbols>off' \
- $(filter -j%,$(PKG_JOBS)) \
+ $(BJAM_JOBS) \
--toolset=gcc-$(ARCH) --build-type=minimal
--layout=system \
--disable-long-double \
$(CONFIGURE_ARGS) \
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel