]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
lfs/Config: fix build if MAX_PARALLELISM is lower than one
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 28 Mar 2021 18:40:34 +0000 (20:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Mar 2021 10:33:19 +0000 (10:33 +0000)
If you have 2GB RAM the build of dnsdist will fail because MAX_PARALLELISM was
set to zero by RAM/2048 because a bit of RAM is used by the system.

This patch ensure that the lowest PARALLELISM value is 1.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/Config

index ee3dc2365cf987e53b8dd3deed956e1d7c9b97e9..eadbbc408184304234eb80825acc22bba6b90b19 100644 (file)
@@ -35,7 +35,9 @@ unexport BUILD_ARCH BUILD_PLATFORM BUILDTARGET CROSSTARGET TOOLCHAIN TOOLS_DIR
 unexport XZ_OPT
 
 PARALLELISM = $(shell echo $$( \
-       if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
+       if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt 1 ]; then \
+               echo 1 ; \
+       elif [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
                echo $(MAX_PARALLELISM); \
        else \
                echo $(DEFAULT_PARALLELISM); \