diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-06-26 19:19:32 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-09 10:53:56 +0100 |
commit | 896b95ba75b575b493e760bd7288525bc54687c8 (patch) | |
tree | 91bb0104fd43b0734b18e1334b227061eeb7c8ec /meta/recipes-support | |
parent | 9cdb9ef7bdfd2f2811d20ff62c34282305ec358a (diff) | |
download | poky-896b95ba75b575b493e760bd7288525bc54687c8.tar.gz |
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
(From OE-Core master rev: c212f306934aa1c7c825e3bb060d4799be1efca1)
(From OE-Core rev: 61831b8afac73496fb54583d95690cf6238286ac)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/boost/boost.inc | 18 |
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 \ | |||
102 | '--layout=system' \ | 102 | '--layout=system' \ |
103 | " | 103 | " |
104 | 104 | ||
105 | #use PARALLEL_MAKE to speed up the build | 105 | # use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater paralelism causes bjam to segfault or to ignore -j |
106 | BJAM_OPTS = '${PARALLEL_MAKE} \ | 106 | # https://svn.boost.org/trac/boost/ticket/7634 |
107 | def get_boost_parallel_make(bb, d): | ||
108 | pm = d.getVar('PARALLEL_MAKE', True) | ||
109 | if pm: | ||
110 | # people are usually using "-jN" or "-j N", but let it work with something else appended to it | ||
111 | import re | ||
112 | pm_prefix = re.search("\D+", pm) | ||
113 | pm_val = re.search("\d+", pm) | ||
114 | if pm_prefix is None or pm_val is None: | ||
115 | bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm) | ||
116 | pm_nval = min(64, int(pm_val.group(0))) | ||
117 | return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():] | ||
118 | |||
119 | BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}" | ||
120 | BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \ | ||
107 | ${BJAM_TOOLS} \ | 121 | ${BJAM_TOOLS} \ |
108 | -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam \ | 122 | -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam \ |
109 | --builddir=${S}/${TARGET_SYS} \ | 123 | --builddir=${S}/${TARGET_SYS} \ |