optionally support parallel toolchain build. This defaults to off, because certain toolchain versions are known to break on parallel build. However, it significantly speeds up the build and latest versions of the tools do compile fine.

SVN-Revision: 23196
v19.07.3_mercusys_ac12_duma
Michael Büsch 14 years ago
parent 68219be4e7
commit cf323eb924

@ -268,7 +268,7 @@ menu "Global build settings"
config PKG_DEFAULT_PARALLEL config PKG_DEFAULT_PARALLEL
bool 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 depends on PKG_BUILD_PARALLEL
default n default n
help help
@ -278,7 +278,21 @@ menu "Global build settings"
packages with multiple jobs that are probably not tested in packages with multiple jobs that are probably not tested in
a parallel build environment. 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" comment "Stripping options"

@ -11,6 +11,8 @@ REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR) STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN) BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
TOOLCHAIN_JOBS?=$(if $(CONFIG_TOOLCHAIN_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS))
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared

@ -79,7 +79,7 @@ define Host/Configure
endef endef
define Host/Compile define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) all $(MAKE) $(TOOLCHAIN_JOBS) -C $(HOST_BUILD_DIR) all
endef endef
define Host/Install define Host/Install

@ -173,7 +173,7 @@ endif
GCC_MAKE:= \ GCC_MAKE:= \
export SHELL="$(BASH)"; \ export SHELL="$(BASH)"; \
$(MAKE) \ $(MAKE) $(TOOLCHAIN_JOBS) \
CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)"

@ -109,7 +109,7 @@ UCLIBC_MAKE = PATH='$(TARGET_PATH)' $(MAKE) -C $(HOST_BUILD_DIR) \
define Host/Compile define Host/Compile
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak $(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 $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
$(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/ $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
$(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/ $(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/

Loading…
Cancel
Save