mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0cac199068
commit
0aedb382b3
@@ -106,16 +106,24 @@ BJAM_TOOLS = "-sTOOLS=gcc \
|
|||||||
def get_boost_parallel_make(bb, d):
|
def get_boost_parallel_make(bb, d):
|
||||||
pm = d.getVar('PARALLEL_MAKE', True)
|
pm = d.getVar('PARALLEL_MAKE', True)
|
||||||
if pm:
|
if pm:
|
||||||
# people are usually using "-jN" or "-j N", but let it work with something else appended to it
|
# look for '-j' and throw other options (e.g. '-l') away
|
||||||
import re
|
# because they might have different meaning in bjam
|
||||||
pm_prefix = re.search("\D+", pm)
|
pm = pm.split()
|
||||||
pm_val = re.search("\d+", pm)
|
while pm:
|
||||||
if pm_prefix is None or pm_val is None:
|
v = None
|
||||||
bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm)
|
opt = pm.pop(0)
|
||||||
pm_nval = min(64, int(pm_val.group(0)))
|
if opt == '-j':
|
||||||
return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():]
|
v = pm.pop(0)
|
||||||
else:
|
elif opt.startswith('-j'):
|
||||||
return ""
|
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)}"
|
BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
|
||||||
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
|
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
|
||||||
|
|||||||
Reference in New Issue
Block a user