From: Arne Fitzenreiter <arne_f@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] lfs/Config: fix build if MAX_PARALLELISM is lower than one
Date: Sun, 28 Mar 2021 20:40:34 +0200 [thread overview]
Message-ID: <20210328184034.1591-1-arne_f@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]
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(a)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
reply other threads:[~2021-03-28 18:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210328184034.1591-1-arne_f@ipfire.org \
--to=arne_f@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox