summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2015-09-10 18:54:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-24 15:50:25 +0000
commit0cc4eef515c0b9604cc2d12cdccb3804ee13d061 (patch)
tree277e339d17c33f5affde3e7dad70b9037e38719d /meta
parent95719b00fb0584af6c1291dc2811eccc96b9f99e (diff)
downloadpoky-0cc4eef515c0b9604cc2d12cdccb3804ee13d061.tar.gz
waf.bbclass: filter out non -j from PARALLEL_MAKE
'waf' supports only simple '-j' and fails when parallel make flags contain extended options like '--load-average'. Patch uses the method from 'boost.inc' to filter '-j'. (From OE-Core rev: bc394e1dd229845a315a97704beca43fbb8976ee) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/waf.bbclass24
1 files changed, 23 insertions, 1 deletions
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 3a221e7082..220dc58651 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,9 +1,31 @@
1def get_waf_parallel_make(bb, d):
2 pm = d.getVar('PARALLEL_MAKE', True)
3 if pm:
4 # look for '-j' and throw other options (e.g. '-l') away
5 # because they might have different meaning in bjam
6 pm = pm.split()
7 while pm:
8 v = None
9 opt = pm.pop(0)
10 if opt == '-j':
11 v = pm.pop(0)
12 elif opt.startswith('-j'):
13 v = opt[2:].strip()
14 else:
15 v = None
16
17 if v:
18 v = min(64, int(v))
19 return '-j' + str(v)
20
21 return ""
22
1waf_do_configure() { 23waf_do_configure() {
2 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} 24 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
3} 25}
4 26
5waf_do_compile() { 27waf_do_compile() {
6 ${S}/waf build ${PARALLEL_MAKE} 28 ${S}/waf build ${@get_waf_parallel_make('PARALLEL_MAKE', d)}
7} 29}
8 30
9waf_do_install() { 31waf_do_install() {