diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2015-09-10 18:54:33 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-24 15:49:12 +0000 |
commit | bc394e1dd229845a315a97704beca43fbb8976ee (patch) | |
tree | 2c78194687f8d3baa788ef0a7f50a65ee836c585 | |
parent | 926a8365b4f7233e5ab5a6b97e8ed53f417c0cfc (diff) | |
download | openembedded-core-bc394e1dd229845a315a97704beca43fbb8976ee.tar.gz openembedded-core-bc394e1dd229845a315a97704beca43fbb8976ee.tar.bz2 openembedded-core-bc394e1dd229845a315a97704beca43fbb8976ee.zip |
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'.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/waf.bbclass | 24 |
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 @@ +def get_waf_parallel_make(bb, d): + pm = d.getVar('PARALLEL_MAKE', True) + if pm: + # 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 "" + waf_do_configure() { ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} } waf_do_compile() { - ${S}/waf build ${PARALLEL_MAKE} + ${S}/waf build ${@get_waf_parallel_make('PARALLEL_MAKE', d)} } waf_do_install() { |