Reduce number of parallel gcc invocations from 4 to 2 per cpu

Some build hosts can run out of memory during compilation.
This should reduce memory demand without affecting build time.

Change-Id: I11bd2884a1f8885a8a332bbbf0a63324a3079c3b
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2016-03-24 17:19:27 +01:00
parent e2efecec42
commit 2e89a894a4

View File

@ -670,7 +670,7 @@ linux_n_cpus = `grep '^processor' /proc/cpuinfo | wc -l`
MAKE_PARALLEL_JOBS = \ MAKE_PARALLEL_JOBS = \
-j $(shell \ -j $(shell \
if [ -f /proc/cpuinfo ] ; then \ if [ -f /proc/cpuinfo ] ; then \
expr 4 '*' $(linux_n_cpus) ; \ expr 2 '*' $(linux_n_cpus) ; \
else \ else \
echo 1 ; \ echo 1 ; \
fi) fi)