package/Makefile.in: set --shuffle=none for MAKE1

Make 4.4 introduces a shuffle mode which randomizes prerequisites
in order to better flush out issues with parallel builds. On the other
hand, we use MAKE1 to build packages that are known to be broken with
parallel build. For these, passing the shuffle option would be
counter-productive and lead to spurious build failures.

The --shuffle=none option exists to turn off shuffling again. We can't
add this option unconditionally, however, because Make < 4.4 doesn't
know it. Therefore, conditionally pass --shuffle=none only if there is a
shuffle option in MAKEFLAGS.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
James Hilliard 2022-10-16 13:30:14 -06:00 committed by Arnout Vandecappelle
parent 7e3105d5c8
commit f664d7dc24

View File

@ -17,7 +17,9 @@ else
PARALLEL_JOBS := $(BR2_JLEVEL)
endif
MAKE1 := $(HOSTMAKE) -j1
# 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)
override MAKE = $(HOSTMAKE) \
$(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))