summaryrefslogtreecommitdiff
path: root/meta/recipes-support/boost
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2014-10-07 14:07:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-10 10:39:12 +0100
commit1ff36aaec25a7ee89514366fe484345e8d1d7b64 (patch)
tree2887942be5248589a9d88f9fbf769da904067bfe /meta/recipes-support/boost
parentfa579cb243b8441d95e6c129e07d9e141f808539 (diff)
downloadopenembedded-core-1ff36aaec25a7ee89514366fe484345e8d1d7b64.tar.gz
openembedded-core-1ff36aaec25a7ee89514366fe484345e8d1d7b64.tar.bz2
openembedded-core-1ff36aaec25a7ee89514366fe484345e8d1d7b64.zip
boost: fix build when ${PARALLEL_MAKE} contains '-l'
The '-l' option which is valid for GNU make (--> limit by load) has a different meaning in bjam (--> limit maximum execution time) and will break very likely the build. Keep only the the '-l' option when passing PARALLEL_MAKE options to bjam. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Diffstat (limited to 'meta/recipes-support/boost')
-rw-r--r--meta/recipes-support/boost/boost.inc28
1 files changed, 18 insertions, 10 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index ad1bc76184..d34ca7cbf1 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -106,16 +106,24 @@ BJAM_TOOLS = "-sTOOLS=gcc \
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():]
- else:
- return ""
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ v = None
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ v = None
+
+ if v:
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \