[OE-core] [PATCH] waf.bbclass: filter out non -j from PARALLEL_MAKE
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Thu Sep 10 16:54:33 UTC 2015
'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 at sigma-chemnitz.de>
---
meta/classes/waf.bbclass | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 3a221e7..220dc58 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() {
--
2.4.3
More information about the Openembedded-core
mailing list