summaryrefslogtreecommitdiff
path: root/waterfox
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-01-15 11:59:22 -0500
committerB Stack <bgstack15@gmail.com>2019-01-15 11:59:22 -0500
commit93ec193d01debd136ee7bc0563f77afe3ed22d4e (patch)
treef6be51ea7be86ec05f9ea5bbd5ee212a9b0e36c2 /waterfox
parentMerge branch 'waterfox-bump' into 'master' (diff)
downloadstackrpms-93ec193d01debd136ee7bc0563f77afe3ed22d4e.tar.gz
stackrpms-93ec193d01debd136ee7bc0563f77afe3ed22d4e.tar.bz2
stackrpms-93ec193d01debd136ee7bc0563f77afe3ed22d4e.zip
waterfox ingest PGO fixes from chinfo
Diffstat (limited to 'waterfox')
-rw-r--r--waterfox/1003_gentoo_specific_pgo.patch31
-rw-r--r--waterfox/mozilla-1320560.patch36
-rw-r--r--waterfox/mozilla-1389436.patch41
-rw-r--r--waterfox/mozilla-1397365-5.patch16
-rw-r--r--waterfox/mozilla-1516081.patch80
-rw-r--r--waterfox/mozilla-1516803.patch14
-rw-r--r--waterfox/pgo.patch28
-rw-r--r--waterfox/waterfox-mozconfig3
-rw-r--r--waterfox/waterfox-webrtc-gtest-libv4l2.patch12
-rw-r--r--waterfox/waterfox.spec56
10 files changed, 303 insertions, 14 deletions
diff --git a/waterfox/1003_gentoo_specific_pgo.patch b/waterfox/1003_gentoo_specific_pgo.patch
new file mode 100644
index 0000000..88e4b69
--- /dev/null
+++ b/waterfox/1003_gentoo_specific_pgo.patch
@@ -0,0 +1,31 @@
+From: Daniel Rammelt <d.rammelt@icloud.com>
+
+Add missing pgo-profile-run due to tests being disabled
+
+Patch modified for newer version by Andrew A. Savchenko <bircoph@gentoo.org>
+
+https://bugs.gentoo.org/show_bug.cgi?id=499650
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -50,16 +50,19 @@ ifndef MOZ_PROFILE_USE
+ ifndef JS_STANDALONE
+ ifdef COMPILE_ENVIRONMENT
+ $(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
+ endif
+ endif
+ endif
+ endif
+
++pgo-profile-run:
++ $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS)
++
+ ifdef JS_STANDALONE
+ .PHONY: CLOBBER
+ CLOBBER:
+ else
+ CLOBBER: $(topsrcdir)/CLOBBER
+ @echo 'STOP! The CLOBBER file has changed.'
+ @echo 'Please run the build through a sanctioned build wrapper, such as'
+ @echo '"mach build" or client.mk.'
diff --git a/waterfox/mozilla-1320560.patch b/waterfox/mozilla-1320560.patch
new file mode 100644
index 0000000..11bd2d8
--- /dev/null
+++ b/waterfox/mozilla-1320560.patch
@@ -0,0 +1,36 @@
+
+# HG changeset patch
+# User Jory A. Pratt <anarchy@gentoo.org>
+# Date 1483893240 18000
+# Node ID 4723934741c51affa834f6866ca5fe5c419ddfe8
+# Parent b3fb981d0e10bcae8c73f6be6856fea266b30017
+Bug 1320560 - Use C99 math isfinite, finite has been depreciated and all modern libc implementations use isfinite. r=froydnj
+
+diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
+--- a/xpcom/ds/nsMathUtils.h
++++ b/xpcom/ds/nsMathUtils.h
+@@ -98,22 +98,18 @@ NS_hypot(double aNum1, double aNum2)
+ * NaN value).
+ */
+ inline bool
+ NS_finite(double aNum)
+ {
+ #ifdef WIN32
+ // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
+ return !!_finite(aNum);
+-#elif defined(XP_DARWIN)
+- // Darwin has deprecated |finite| and recommends |isfinite|. The former is
+- // not present in the iOS SDK.
++#else
+ return std::isfinite(aNum);
+-#else
+- return finite(aNum);
+ #endif
+ }
+
+ /**
+ * Returns the result of the modulo of x by y using a floored division.
+ * fmod(x, y) is using a truncated division.
+ * The main difference is that the result of this method will have the sign of
+ * y while the result of fmod(x, y) will have the sign of x.
+
diff --git a/waterfox/mozilla-1389436.patch b/waterfox/mozilla-1389436.patch
new file mode 100644
index 0000000..b7a87d2
--- /dev/null
+++ b/waterfox/mozilla-1389436.patch
@@ -0,0 +1,41 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1502455819 -32400
+# Node ID 97dae871389b7f22a7096a020781b07a5a61de58
+# Parent c73f64ef71d2d87f36008f5ff661f4050692bd06
+Bug 1389436 - Explicitly instantiate gfxFont::GetShapedWord<uint8_t> for its use in gfxTextRun.cpp. r=jfkthame
+
+diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp
+--- a/gfx/thebes/gfxFont.cpp
++++ b/gfx/thebes/gfxFont.cpp
+@@ -2634,16 +2634,28 @@ gfxFont::GetShapedWord(DrawTarget *aDraw
+ ShapeText(aDrawTarget, aText, 0, aLength, aRunScript, aVertical,
+ aRounding, sw);
+
+ NS_WARNING_ASSERTION(ok, "failed to shape word - expect garbled text");
+
+ return sw;
+ }
+
++template gfxShapedWord*
++gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
++ const uint8_t *aText,
++ uint32_t aLength,
++ uint32_t aHash,
++ Script aRunScript,
++ bool aVertical,
++ int32_t aAppUnitsPerDevUnit,
++ gfx::ShapedTextFlags aFlags,
++ RoundingFlags aRounding,
++ gfxTextPerfMetrics *aTextPerf);
++
+ bool
+ gfxFont::CacheHashEntry::KeyEquals(const KeyTypePointer aKey) const
+ {
+ const gfxShapedWord* sw = mShapedWord.get();
+ if (!sw) {
+ return false;
+ }
+ if (sw->GetLength() != aKey->mLength ||
+
diff --git a/waterfox/mozilla-1397365-5.patch b/waterfox/mozilla-1397365-5.patch
new file mode 100644
index 0000000..e361374
--- /dev/null
+++ b/waterfox/mozilla-1397365-5.patch
@@ -0,0 +1,16 @@
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/pgo/profileserver.py.mozilla-1397365 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/pgo/profileserver.py
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/pgo/profileserver.py.mozilla-1397365 2019-01-09 13:37:54.237593732 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/pgo/profileserver.py 2019-01-09 13:38:59.149417440 -0200
+@@ -67,10 +67,11 @@ if __name__ == '__main__':
+ env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
+ break
+
++ quitterHTML = 'data:text/html,<html><head><script>Quitter.quit();</script></head></html>'
+ # Run Firefox a first time to initialize its profile
+ runner = FirefoxRunner(profile=profile,
+ binary=build.get_binary_path(where="staged-package"),
+- cmdargs=['javascript:Quitter.quit()'],
++ cmdargs=[quitterHTML],
+ env=env)
+ runner.start()
+ runner.wait()
diff --git a/waterfox/mozilla-1516081.patch b/waterfox/mozilla-1516081.patch
new file mode 100644
index 0000000..f840432
--- /dev/null
+++ b/waterfox/mozilla-1516081.patch
@@ -0,0 +1,80 @@
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/js/src/old-configure.in.1516081 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/js/src/old-configure.in
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/js/src/old-configure.in.1516081 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/js/src/old-configure.in 2019-01-08 11:37:40.962313001 -0200
+@@ -1829,7 +1829,7 @@ dnl Test for profiling options
+ dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use
+
+ _SAVE_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
++CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction -DMOZ_PROFILE_INSTRUMENTATION"
+
+ AC_MSG_CHECKING([whether C compiler supports -fprofile-generate])
+ AC_TRY_COMPILE([], [return 0;],
+@@ -1839,7 +1839,7 @@ AC_MSG_RESULT([$result])
+
+ if test $result = "yes"; then
+ PROFILE_GEN_LDFLAGS="-fprofile-generate"
+- PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
++ PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -DMOZ_PROFILE_INSTRUMENTATION"
+ PROFILE_USE_LDFLAGS="-fprofile-use"
+ fi
+
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/nsprpub/configure.in.1516081 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/nsprpub/configure.in
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/nsprpub/configure.in.1516081 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/nsprpub/configure.in 2019-01-08 11:37:49.866304640 -0200
+@@ -756,7 +756,7 @@ dnl Test for profiling options
+ dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use
+
+ _SAVE_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
++CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction -DMOZ_PROFILE_INSTRUMENTATION"
+
+ AC_MSG_CHECKING([whether C compiler supports -fprofile-generate])
+ AC_TRY_COMPILE([], [return 0;],
+@@ -766,7 +766,7 @@ AC_MSG_RESULT([$result])
+
+ if test $result = "yes"; then
+ PROFILE_GEN_LDFLAGS="-fprofile-generate"
+- PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
++ PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -DMOZ_PROFILE_INSTRUMENTATION"
+ PROFILE_USE_LDFLAGS="-fprofile-use"
+ fi
+
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/old-configure.in.1516081 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/old-configure.in
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/old-configure.in.1516081 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/old-configure.in 2019-01-08 11:38:01.282293920 -0200
+@@ -4219,7 +4219,7 @@ dnl Test for profiling options
+ dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use
+
+ _SAVE_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
++CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction -DMOZ_PROFILE_INSTRUMENTATION"
+
+ AC_MSG_CHECKING([whether C compiler supports -fprofile-generate])
+ AC_TRY_COMPILE([], [return 0;],
+@@ -4229,7 +4229,7 @@ AC_MSG_RESULT([$result])
+
+ if test $result = "yes"; then
+ PROFILE_GEN_LDFLAGS="-fprofile-generate"
+- PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
++ PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -DMOZ_PROFILE_INSTRUMENTATION"
+ PROFILE_USE_LDFLAGS="-fprofile-use"
+ fi
+
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/toolkit/components/terminator/nsTerminator.cpp.1516081 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/toolkit/components/terminator/nsTerminator.cpp
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/toolkit/components/terminator/nsTerminator.cpp.1516081 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/toolkit/components/terminator/nsTerminator.cpp 2019-01-08 11:38:52.969192841 -0200
+@@ -389,6 +389,13 @@ nsTerminator::StartWatchdog()
+ crashAfterMS += ADDITIONAL_WAIT_BEFORE_CRASH_MS;
+ }
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++#ifdef MOZ_PROFILE_INSTRUMENTATION
++ crashAfterMS = INT32_MAX;
++#endif
++
+ UniquePtr<Options> options(new Options());
+ const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000);
+ options->crashAfterTicks = crashAfterMS / ticksDuration;
diff --git a/waterfox/mozilla-1516803.patch b/waterfox/mozilla-1516803.patch
new file mode 100644
index 0000000..972d6fa
--- /dev/null
+++ b/waterfox/mozilla-1516803.patch
@@ -0,0 +1,14 @@
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/security/sandbox/linux/moz.build.1516803 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/security/sandbox/linux/moz.build
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/security/sandbox/linux/moz.build.1516803 2019-01-08 11:39:44.002864753 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/security/sandbox/linux/moz.build 2019-01-08 11:40:38.624513603 -0200
+@@ -98,8 +98,8 @@ if CONFIG['GNU_CXX']:
+ # gcc lto likes to put the top level asm in syscall.cc in a different partition
+ # from the function using it which breaks the build. Work around that by
+ # forcing there to be only one partition.
+-if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
+- LDFLAGS += ['--param lto-partitions=1']
++if CONFIG['CC_TYPE'] != 'clang':
++ LDFLAGS += ['--param', 'lto-partitions=1']
+
+ DEFINES['NS_NO_XPCOM'] = True
+ DISABLE_STL_WRAPPING = True
diff --git a/waterfox/pgo.patch b/waterfox/pgo.patch
new file mode 100644
index 0000000..21776b7
--- /dev/null
+++ b/waterfox/pgo.patch
@@ -0,0 +1,28 @@
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/unix/mozconfig.linux.pgo Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/unix/mozconfig.linux
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/unix/mozconfig.linux.pgo 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/build/unix/mozconfig.linux 2019-01-08 11:26:46.625843204 -0200
+@@ -17,6 +17,15 @@ then
+ CC="$TOOLTOOL_DIR/gcc/bin/gcc"
+ CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+
++ if [ -n "$MOZ_PGO" ]; then
++# if [ -z "$USE_ARTIFACT" ]; then
++# ac_add_options --enable-lto
++# fi
++ export AR="$topsrcdir/gcc/bin/gcc-ar"
++ export NM="$topsrcdir/gcc/bin/gcc-nm"
++ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
++ fi
++
+ # We want to make sure we use binutils and other binaries in the tooltool
+ # package.
+ mk_add_options PATH="$TOOLTOOL_DIR/gcc/bin:$PATH"
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/extensions/spellcheck/src/moz.build.pgo Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/extensions/spellcheck/src/moz.build
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/extensions/spellcheck/src/moz.build.pgo 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/extensions/spellcheck/src/moz.build 2019-01-08 11:27:26.673823140 -0200
+@@ -32,3 +32,5 @@ EXPORTS.mozilla += [
+
+ if CONFIG['GNU_CXX']:
+ CXXFLAGS += ['-Wno-error=shadow']
++
++CXXFLAGS += ['-fno-devirtualize']
diff --git a/waterfox/waterfox-mozconfig b/waterfox/waterfox-mozconfig
index 57b40bb..8b58d95 100644
--- a/waterfox/waterfox-mozconfig
+++ b/waterfox/waterfox-mozconfig
@@ -7,7 +7,6 @@ ac_add_options --libdir="$LIBDIR"
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --disable-strip
-ac_add_options --disable-tests
#ac_add_options --enable-libnotify
ac_add_options --enable-necko-wifi
ac_add_options --enable-startup-notification
@@ -23,6 +22,7 @@ ac_add_options --disable-gconf
ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
+mk_add_options XARGS=/usr/bin/xargs
export MOZ_GECKO_PROFILER=
export MOZ_ENABLE_PROFILER_SPS=
@@ -35,6 +35,7 @@ ac_add_options --disable-profiling
ac_add_options --disable-signmar
ac_add_options --disable-verify-mar
+ac_add_options --enable-rust-simd
ac_add_options --enable-stylo=build
ac_add_options --with-app-name=waterfox
diff --git a/waterfox/waterfox-webrtc-gtest-libv4l2.patch b/waterfox/waterfox-webrtc-gtest-libv4l2.patch
new file mode 100644
index 0000000..fb09b9d
--- /dev/null
+++ b/waterfox/waterfox-webrtc-gtest-libv4l2.patch
@@ -0,0 +1,12 @@
+diff -up Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/media/webrtc/trunk/gtest/moz.build.l4vl2 Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/media/webrtc/trunk/gtest/moz.build
+--- Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/media/webrtc/trunk/gtest/moz.build.l4vl2 2018-12-17 10:39:21.000000000 -0200
++++ Waterfox-ff4597172229f8d71940c3885b74b903b7b1821a/media/webrtc/trunk/gtest/moz.build 2019-01-08 17:34:47.260911090 -0200
+@@ -48,6 +48,8 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
+ else:
+ USE_LIBS += ['media_libjpeg']
+
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+ else:
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 <bgstack15@gmail.com> - 56.2.6-1.20181217gitff45971
+* Tue Jan 15 2019 B Stack <bgstack15@gmail.com> - 56.2.6-3.20181217gitff45971
- repackage for stackrpms
+* Wed Jan 09 2019 Phantom X <megaphantomx at bol dot com dot br> - 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 <megaphantomx at bol dot com dot br> - 56.2.6-1.20181217gitff45971
- New release/snapshot
bgstack15