[Buildroot] [PATCHv2 7/7] automatically set PARALLEL_JOBS when BR2_JLEVEL is 0

Baruch Siach baruch at tkos.co.il
Thu Jun 14 18:09:18 UTC 2012


Hi Nathan,

On Thu, Jun 14, 2012 at 10:02:45AM -0500, Nathan Lynch wrote:
> When BR2_JLEVEL is 0, set PARALLEL_JOBS to double the number of CPUs
> detected.  This allows one to more or less fully utilize the host
> system without manually tuning the configuration.
> 
> Also make 0 the default value for BR2_JLEVEL.
> 
> Signed-off-by: Nathan Lynch <ntl at pobox.com>
> ---

[snip]

> +ifeq ($(BR2_JLEVEL),0)
> +PARALLEL_JOBS:=$(shell echo \
> +	$$((2 * `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`)))
> +else
>  PARALLEL_JOBS:=$(BR2_JLEVEL)
> +endif

IMO, there should be a comment here explaining the magic (2*CPUs) number.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the buildroot mailing list