config PKG_DEFAULT_PARALLEL
bool
- prompt "Always parallelize the default package build rule (Dangerous)"
+ prompt "Parallelize the default package build rule (May break build)"
depends on PKG_BUILD_PARALLEL
default n
help
packages with multiple jobs that are probably not tested in
a parallel build environment.
- Say N. Only say Y for testing.
+ Only say Y, if you don't mind fixing broken packages.
+ Before reporting build bugs, set this to N and re-run the build.
+
+ config TOOLCHAIN_PARALLEL
+ bool
+ prompt "Parallelize the toolchain build (May break build)"
+ depends on PKG_BUILD_PARALLEL
+ default n
+ help
+ Build the toolchain with parallel make jobs.
+ This speeds up the toolchain build on SMP machines, but may
+ break the build for certain toolchain versions.
+
+ If you say Y, toolchain build might break.
+ Before reporting build bugs, set this to N and re-run the build.
comment "Stripping options"
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
+TOOLCHAIN_JOBS?=$(if $(CONFIG_TOOLCHAIN_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS))
+
include $(INCLUDE_DIR)/host-build.mk
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared
GCC_MAKE:= \
export SHELL="$(BASH)"; \
- $(MAKE) \
+ $(MAKE) $(TOOLCHAIN_JOBS) \
CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)"
define Host/Compile
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
- $(UCLIBC_MAKE) PREFIX= all
+ $(UCLIBC_MAKE) $(TOOLCHAIN_JOBS) PREFIX= all
$(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
$(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
$(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/