From 93ec193d01debd136ee7bc0563f77afe3ed22d4e Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 15 Jan 2019 11:59:22 -0500 Subject: waterfox ingest PGO fixes from chinfo --- waterfox/waterfox.spec | 56 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 13 deletions(-) (limited to 'waterfox/waterfox.spec') diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec index 948ebbd..2d29467 100644 --- a/waterfox/waterfox.spec +++ b/waterfox/waterfox.spec @@ -31,12 +31,9 @@ ExcludeArch: armv7hl %global hardened_build 1 %global build_with_clang 0 -%if 0%{?fedora} >= 29 -%ifarch x86_64 aarch64 -%global build_with_clang 1 +%ifnarch %{ix86} ppc64 s390x +%global build_with_pgo 1 %endif -%endif -%global build_with_pgo 0 # Big endian platforms %ifarch ppc64 s390x @@ -116,7 +113,7 @@ ExcludeArch: armv7hl Summary: Waterfox Web browser Name: waterfox Version: 56.2.6 -Release: 1%{?gver}%{?dist} +Release: 3%{?gver}%{?dist} URL: https://www.waterfoxproject.org License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -179,6 +176,8 @@ Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch Patch416: bug1375074-save-restore-x28.patch Patch417: mozilla-1436242.patch Patch418: https://hg.mozilla.org/integration/autoland/raw-rev/342812d23eb9#/mozilla-1336978.patch +Patch419: https://hg.mozilla.org/mozilla-central/raw-rev/4723934741c5#/mozilla-1320560.patch +Patch420: https://hg.mozilla.org/mozilla-central/raw-rev/97dae871389b#/mozilla-1389436.patch # Upstream updates @@ -187,11 +186,20 @@ Patch418: https://hg.mozilla.org/integration/autoland/raw-rev/342812d23eb # Debian patches Patch500: mozilla-440908.patch +# PGO/LTO patches +Patch600: pgo.patch +Patch601: mozilla-1516081.patch +Patch602: mozilla-1516803.patch +Patch603: mozilla-1397365-5.patch +Patch604: 1003_gentoo_specific_pgo.patch + # Chinforinfula patches Patch700: %{name}-nolangpacks.patch # https://github.com/MrAlex94/Waterfox/pull/547.patch, down Patch701: %{name}-waterfoxdir-1.patch Patch702: %{name}-waterfoxdir-2.patch +Patch703: %{name}-webrtc-gtest-libv4l2.patch + %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} @@ -259,6 +267,7 @@ BuildRequires: libstdc++-static %else BuildRequires: gcc-c++ %endif +BuildRequires: bash BuildRequires: patchutils Requires: mozilla-filesystem @@ -371,10 +380,19 @@ This package contains results of tests executed during build. %patch416 -p1 -b .bug1375074-save-restore-x28 %patch417 -p1 -b .mozilla-1436242 %patch418 -p1 -b .mozilla-1336978 +%patch419 -p1 -b .mozilla-1320560 +%patch420 -p1 -b .mozilla-1389436 # Debian extension patch %patch500 -p1 -b .440908 +# PGO patches +%patch600 -p1 -b .pgo +%patch601 -p1 -b .1516081 +%patch602 -p1 -b .1516803 +%patch603 -p1 -b .1397365 +%patch604 -p1 -b .gentoo_pgo + # Prepare FreeBSD patches mkdir _patches cp -p %{freebsd_root}/patch-{bug,z-bug,revert-bug}* _patches/ @@ -416,6 +434,7 @@ done %patch700 -p1 -b .nolangpacks %patch701 -p1 -b .waterfoxdir-1 %patch702 -p1 -b .waterfoxdir-2 +%patch703 -p1 -b .lv4l2 # Patch for big endian platforms only %if 0%{?big_endian} @@ -434,14 +453,15 @@ echo 'export AR="llvm-ar"' >> .mozconfig echo 'export NM="llvm-nm"' >> .mozconfig echo 'export RANLIB="llvm-ranlib"' >> .mozconfig echo "ac_add_options --enable-linker=gold" >> .mozconfig -echo "ac_add_options --enable-rust-simd" >> .mozconfig %else echo 'export CC=gcc' >> .mozconfig echo 'export CXX=g++' >> .mozconfig echo "ac_add_options --enable-linker=gold" >> .mozconfig %endif %if 0%{?build_with_pgo} -echo "ac_add_options MOZ_PGO=1" >> .mozconfig +echo "mk_add_options MOZ_PGO=1" >> .mozconfig +echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> .mozconfig +#echo "ac_add_options --enable-lto" >> .mozconfig %endif %if %{?system_nss} @@ -529,8 +549,10 @@ echo "ac_add_options --disable-jemalloc" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig %endif -%if %{?run_tests} +%if %{?build_tests} echo "ac_add_options --enable-tests" >> .mozconfig +%else +echo "ac_add_options --disable-tests" >> .mozconfig %endif %if !%{?system_jpeg} @@ -649,6 +671,8 @@ export CC=gcc export CXX=g++ %endif +smp_mflags_cpus=$(echo %{_smp_mflags} | sed 's|-j||g') + MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. @@ -660,6 +684,7 @@ MOZ_SMP_FLAGS=-j1 %ifarch x86_64 ppc ppc64 ppc64le aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$smp_mflags_cpus" -lt "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS="$smp_mflags_cpus" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 @@ -667,11 +692,12 @@ MOZ_SMP_FLAGS=-j1 export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" export MOZ_SERVICES_SYNC="1" +export MOZ_NOSPAM=1 export STRIP=/bin/true %if 0%{?build_with_pgo} -xvfb-run ./mach build +SHELL=/usr/bin/bash GDK_BACKEND=x11 xvfb-run ./mach build -v %else -./mach build +SHELL=/usr/bin/bash ./mach build -v %endif %if %{?run_tests} @@ -716,7 +742,7 @@ cat > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF pref("general.useragent.locale", "chrome://global/locale/intl.properties"); EOF -DESTDIR=%{buildroot} make -C objdir install +DESTDIR=%{buildroot} SHELL=/usr/bin/bash MOZ_NOSPAM=1 make -C objdir install mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} @@ -941,9 +967,13 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Jan 2 2019 B Stack - 56.2.6-1.20181217gitff45971 +* Tue Jan 15 2019 B Stack - 56.2.6-3.20181217gitff45971 - repackage for stackrpms +* Wed Jan 09 2019 Phantom X - 56.2.6-2.20181217gitff45971 +- PGO and fixes for it to work (from Gentoo and Fedora Firefox) +- Return gcc build + * Wed Dec 12 2018 Phantom X - 56.2.6-1.20181217gitff45971 - New release/snapshot -- cgit