From 4ed6b0c90a08686b99dd7fda0c04cc50e66d1ec4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Dec 2018 10:38:32 +0100 Subject: [PATCH] Enabled only 2 parallel build tasks on i686/arm, use gold linker with gcc --- firefox.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index 85aa5e0..cf6542c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -576,15 +576,21 @@ echo "ac_add_options --enable-linker=lld" >> .mozconfig %else export CC=gcc export CXX=g++ +echo "ac_add_options --enable-linker=gold" >> .mozconfig %endif -%if %{?build_with_pgo} +%if 0%{?build_with_pgo} echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif MOZ_SMP_FLAGS=-j1 -# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, +# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 +%ifarch %{ix86} %{arm} +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +%endif +%ifarch x86_64 ppc ppc64 ppc64le aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -592,7 +598,6 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif -#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" export MOZ_SERVICES_SYNC="1" export STRIP=/bin/true