[packages/thunderbird] - parallel non clang build

arekm arekm at pld-linux.org
Sun Jan 26 11:18:56 CET 2020


commit a7ed76ab8993e33e782bc827a81bbcd3a0d27a30
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jan 26 11:18:46 2020 +0100

    - parallel non clang build

 thunderbird.spec | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/thunderbird.spec b/thunderbird.spec
index 7ecdd6a..12f0339 100644
--- a/thunderbird.spec
+++ b/thunderbird.spec
@@ -1349,7 +1349,16 @@ ac_add_options --with-system-png
 ac_add_options --with-system-zlib
 EOF
 
-%{!?with_clang:export MOZ_MAKE_FLAGS="-j1"}
+%if ! %{with clang}
+# 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.
+RPM_BUILD_NR_THREADS=1
+%ifarch %{x8664}
+jobs=$(echo %{_smp_mflags} | cut -dj -f2)
+[ -n "$jobs" -a "$jobs" -gt 4 ] && RPM_BUILD_NR_THREADS=4 || RPM_BUILD_NR_THREADS="$jobs"
+%endif
+export MOZ_MAKE_FLAGS="-j${RPM_BUILD_NR_THREADS}"
+%endif
 
 AUTOCONF=/usr/bin/autoconf2_13 ./mach build
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/thunderbird.git/commitdiff/a7ed76ab8993e33e782bc827a81bbcd3a0d27a30



More information about the pld-cvs-commit mailing list