From 0e1bf79e56ab1ee69c283571a555d053eb3bb2c9 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 10 Dec 2015 10:30:31 +0100 Subject: [PATCH] qt5: qtwebengine: reduce parallel make jobs The aim is to reduce even more the memory used by the host at build time to avoid the OOM killer killing the linker. Otherwise it can fail in machines with few memory even though the linker is configured with '--no-keep-memory'. Notice that we also reduce the parallel jobs expanded by 'ninja' build system configuring and exporting NINJAFLAGS variable. Otherwise this build system does not honor PARALLEL_MAKE variable. Fix: arm-dey-linux-gnueabi-g++: internal compiler error: Killed (program cc1plus) ninja: build stopped: subcommand failed. https://jira.digi.com/browse/DEL-1973 Signed-off-by: Javier Viguera --- meta-digi-dey/recipes-qt/qt5/qtwebengine_%.bbappend | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-digi-dey/recipes-qt/qt5/qtwebengine_%.bbappend b/meta-digi-dey/recipes-qt/qt5/qtwebengine_%.bbappend index 929c37933..00823ef42 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtwebengine_%.bbappend +++ b/meta-digi-dey/recipes-qt/qt5/qtwebengine_%.bbappend @@ -3,3 +3,10 @@ # Decrease memory used by the linker to avoid being killed due to # out of memory. LDFLAGS += "-Wl,--no-keep-memory" + +# To avoid the OOM killer, decrease parallel make jobs for this specific recipe. +python __anonymous () { + makejobs = int(d.getVar('PARALLEL_MAKE', True).split()[1]) / 2 + d.setVar("PARALLEL_MAKE", "-j %d" % (makejobs, 1)[makejobs == 0]) +} +export NINJAFLAGS = "${PARALLEL_MAKE}"