summaryrefslogtreecommitdiffstats
path: root/meta
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 16:44:32 +0100
commit0aedb382b397ab374a77851c837df2a622d5f47d (patch)
tree9dc617ac87c5c4b6cda4006dfd1bf5d81dd46619 /meta
parent0cac199068a3c0614034989538b264beef15e665 (diff)
downloadpoky-0aedb382b397ab374a77851c837df2a622d5f47d.tar.gz
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. (From OE-Core rev: 1ff36aaec25a7ee89514366fe484345e8d1d7b64) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 \
106def get_boost_parallel_make(bb, d): 106def get_boost_parallel_make(bb, d):
107 pm = d.getVar('PARALLEL_MAKE', True) 107 pm = d.getVar('PARALLEL_MAKE', True)
108 if pm: 108 if pm:
109 # people are usually using "-jN" or "-j N", but let it work with something else appended to it 109 # look for '-j' and throw other options (e.g. '-l') away
110 import re 110 # because they might have different meaning in bjam
111 pm_prefix = re.search("\D+", pm) 111 pm = pm.split()
112 pm_val = re.search("\d+", pm) 112 while pm:
113 if pm_prefix is None or pm_val is None: 113 v = None
114 bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm) 114 opt = pm.pop(0)
115 pm_nval = min(64, int(pm_val.group(0))) 115 if opt == '-j':
116 return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():] 116 v = pm.pop(0)
117 else: 117 elif opt.startswith('-j'):
118 return "" 118 v = opt[2:].strip()
119 else:
120 v = None
121
122 if v:
123 v = min(64, int(v))
124 return '-j' + str(v)
125
126 return ""
119 127
120BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}" 128BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
121BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \ 129BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \