Date:2010-08-18 15:57:58 (2 years 9 months ago)
Author:mb
Commit:c7ee63dd761a6cf7f863b00181aaa2002784f06b
Message:Support parallel build of certain packages

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22696 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: Config.in (1 diff)
include/package-defaults.mk (1 diff)
include/package.mk (1 diff)

Change Details

Config.in
215215        help
216216          Enable IPV6 support in packages (passes --enable-ipv6 to configure scripts).
217217
218    config PKG_BUILD_PARALLEL
219        bool
220        prompt "Compile certain packages parallelized"
221        default n
222        help
223          This adds a -jX option to certain packages that are known to
224          behave well for parallel build.
225
226          Note that this may overcommit CPU resources depending on the
227          -j level of the main make process, the number of package
228          submake jobs selected below and the number of actual CPUs present.
229          Example: If the main make is passed a -j4 and the submake -j
230          is also set to 4, we may end up with 16 parallel make processes
231          in the worst case.
232
233          You get maximum build performance, if you set the package build
234          jobs to the number of CPUs (cores) available and also start the main
235          make process with -jX, where X is the number of CPUs (cores).
236          However, make sure you have enough RAM available for
237          NR_CPUS to the power of two (NR_CPUS^2) make jobs.
238
239          If you are unsure, select N.
240
241    config PKG_BUILD_JOBS
242        int
243        prompt "Number of package submake jobs (2-512)"
244        range 2 512
245        default 2
246        depends on PKG_BUILD_PARALLEL
247        help
248          The number of jobs (-jX) to pass to packages submake.
249
218250    comment "Stripping options"
219251
220252    choice
include/package-defaults.mk
113113
114114define Build/Compile/Default
115115    $(MAKE_VARS) \
116    $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
116    $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
117117        $(MAKE_FLAGS) \
118118        $(1);
119119endef
include/package.mk
1010PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
1111PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
1212PKG_MD5SUM ?= unknown
13PKG_BUILD_PARALLEL ?=
14PKG_JOBS ?= $(if $(PKG_BUILD_PARALLEL),$(if $(CONFIG_PKG_BUILD_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS)))
1315
1416include $(INCLUDE_DIR)/prereq.mk
1517include $(INCLUDE_DIR)/host.mk

Archive Download the corresponding diff file



interactive