[Buildroot] [PATCH 1/1] package/Makefile.in: set .NOTPARALLEL for MAKE1

Yann E. MORIN yann.morin.1998 at free.fr
Sun Oct 16 16:26:54 UTC 2022


James, All,

On 2022-10-14 18:56 -0600, James Hilliard spake thusly:
> Make 4.4 introduces a shuffle mode which randomizes prerequisites
> in order to better flush out issues with parallel builds, as this
> mode randomizes prerequisites even when using -j1 builds we must
> instead explicitely mark parallel incompatible builds using the
> .NOTPARALLEL special target which disables prerequisites
> randomization when running in shuffle mode.
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> ---
>  package/Makefile.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 43d214bcbe..2327849a1f 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -17,7 +17,7 @@ else
>  PARALLEL_JOBS := $(BR2_JLEVEL)
>  endif
>  
> -MAKE1 := $(HOSTMAKE) -j1
> +MAKE1 := $(HOSTMAKE) --eval .NOTPARALLEL:

Packages that do not build in parallel do not because their rules assume
the ordering is kept.

I don't see how replacing -j1 with --eval .NOTPARALLEL: would cause the
ordering to be restored.

Instead, I would have expected we do something like:

    # Only build one job at a time, *and* to not randomise goals and
    # prerequisites ordering in make 4.4+
    MAKE1 := $(HOSTMAKE) -j1 $(if $(findstring --shuffle,$(MAKEFLAGS)),--shuffle=none)

Regards,
Yann E. MORIN.

>  override MAKE = $(HOSTMAKE) \
>  	$(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))
>  
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list