summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-06-26 19:19:32 +0200
committerSaul Wold <sgw@linux.intel.com>2013-06-27 09:49:15 -0700
commitc212f306934aa1c7c825e3bb060d4799be1efca1 (patch)
treeb4d50a380712eae50ecd01ef3ffed019e26cc0fd /meta/recipes-support
parent8be4d1314a1334f5218e4eb46d3f8b734d5516f5 (diff)
downloadopenembedded-core-c212f306934aa1c7c825e3bb060d4799be1efca1.tar.gz
openembedded-core-c212f306934aa1c7c825e3bb060d4799be1efca1.tar.bz2
openembedded-core-c212f306934aa1c7c825e3bb060d4799be1efca1.zip
boost: Limit PARALLEL_MAKE by -j 64
* 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> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/boost/boost.inc18
1 files changed, 16 insertions, 2 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index a1c35c7b95..87bac23340 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} \