qtwebengine: fix compilation when using 1 core

From python 2.x to python 3.x, the '/' operator changed from integer
division to float division.

Hence, when using one core, 'makejobs' was being evaluated to 0.5.
That caused the evaluation below (makejobs == 0) to return False (0),
therefore PARALLEL_MAKE was evaluated to '-j 0' and the compilation
failed because the 'j' parameter must be strictly postive.

Replace the operator by the integer div operator in python 3.x '//'.

https://jira.digi.com/browse/DEL-5769

Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
This commit is contained in:
Jose Diaz de Grenu 2018-02-26 11:41:36 +01:00
parent 4c6689a2f8
commit c8d629e795
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ LDFLAGS += "-Wl,--no-keep-memory"
# To avoid the OOM killer, decrease parallel make jobs for this specific recipe. # To avoid the OOM killer, decrease parallel make jobs for this specific recipe.
python __anonymous () { python __anonymous () {
makejobs = int(d.getVar('PARALLEL_MAKE', True).split()[1]) / 2 makejobs = int(d.getVar('PARALLEL_MAKE', True).split()[1]) // 2
d.setVar("PARALLEL_MAKE", "-j %d" % (makejobs, 1)[makejobs == 0]) d.setVar("PARALLEL_MAKE", "-j %d" % (makejobs, 1)[makejobs == 0])
} }
export NINJAFLAGS = "${PARALLEL_MAKE}" export NINJAFLAGS = "${PARALLEL_MAKE}"