From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] boost: Limit PARALLEL_MAKE by -j 64
Date: Wed, 26 Jun 2013 19:19:32 +0200 [thread overview]
Message-ID: <1372267173-2787-1-git-send-email-Martin.Jansa@gmail.com> (raw)
* greater paralelism isn't supported by bjam and causes segfault or ignoring -j
* PARALLEL_MAKE was enabled for boost in
http://git.openembedded.org/openembedded-core/commit/?id=9b9cfc1dfe5e3b8f89b7a8508537166d0f23935e
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/recipes-support/boost/boost.inc | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index a1c35c7..87bac23 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -102,8 +102,22 @@ BJAM_TOOLS = "-sTOOLS=gcc \
'--layout=system' \
"
-#use PARALLEL_MAKE to speed up the build
-BJAM_OPTS = '${PARALLEL_MAKE} \
+# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater paralelism causes bjam to segfault or to ignore -j
+# https://svn.boost.org/trac/boost/ticket/7634
+def get_boost_parallel_make(bb, d):
+ pm = d.getVar('PARALLEL_MAKE', True)
+ if pm:
+ # people are usually using "-jN" or "-j N", but let it work with something else appended to it
+ import re
+ pm_prefix = re.search("\D+", pm)
+ pm_val = re.search("\d+", pm)
+ if pm_prefix is None or pm_val is None:
+ bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm)
+ pm_nval = min(64, int(pm_val.group(0)))
+ return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():]
+
+BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
+BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
${BJAM_TOOLS} \
-sBOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam \
--builddir=${S}/${TARGET_SYS} \
--
1.8.2.1
next reply other threads:[~2013-06-26 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 17:19 Martin Jansa [this message]
2013-06-26 17:19 ` [PATCH] boost: Limit PARALLEL_MAKE by -j 64 Martin Jansa
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=1372267173-2787-1-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.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