[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfire-development
Subject:    [PATCH] lfs/Config: fix build if MAX_PARALLELISM is lower than one
From:       Arne Fitzenreiter <arne_f () ipfire ! org>
Date:       2021-03-28 18:40:34
Message-ID: 20210328184034.1591-1-arne_f () ipfire ! org
[Download RAW message or body]

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>
---
 lfs/Config | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lfs/Config b/lfs/Config
index ee3dc2365..4e3ddb880 100644
--- a/lfs/Config
+++ b/lfs/Config
@@ -35,11 +35,15 @@ 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 \
-		echo $(MAX_PARALLELISM); \
+	if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt 1 ]; then \
+		echo 1 ; \
 	else \
-		echo $(DEFAULT_PARALLELISM); \
-	fi) \
+		if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
+			echo $(MAX_PARALLELISM); \
+		else \
+			echo $(DEFAULT_PARALLELISM); \
+		fi \
+	fi ) \
 )
 
 MAKETUNING = -j$(PARALLELISM)
-- 
2.25.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic