summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD23
-rw-r--r--pgo-1.patch15
-rw-r--r--pgo-2.patch11
3 files changed, 42 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8ba5d3f..8a117e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,7 @@
pkgname=firefox
pkgver=65.0.1
bz2ver=$(echo $pkgver | sed 's/\./_/g')
-pkgrel=1
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org"
arch=(x86_64)
license=(MPL GPL LGPL)
@@ -35,12 +35,16 @@ options=(!emptydirs !makeflags)
source=($pkgname-$pkgver.tar.bz2::https://hg.mozilla.org/releases/mozilla-release/archive/FIREFOX_${bz2ver}_RELEASE.tar.bz2
$pkgname.desktop $pkgname-symbolic.svg
vendor.js
+ pgo-1.patch
+ pgo-2.patch
moz.configure.diff
package-manifest.diff)
sha256sums=('97c4817feb5e9df065c0544d3589f4c99f7015bfa2c14dc67116f82026d843dd'
'677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a'
'9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797'
'1db31c55df4e45d9f0d2fafaa0a6ea8bc29bf9fb709d3937b1bb6c48b707e756'
+ 'a8c15c9d54ef8b360c0932f4ccf5e74954f14e9a9c2a1ae924b6c392075b2b8c'
+ '33a91a7e8ca702ee493f483abe93bf6917881dc4192566587bdfb103da3a2422'
'ad8a270e1b2affb098440f82517c3952207b28ebf604fef695dad3e29a5ba30e'
'927e400d6920b98d2fe7db2b6498f195135909a76e0da49441223956364d8227')
@@ -48,21 +52,26 @@ prepare() {
# mkdir mozbuild
cd mozilla-release-FIREFOX_${bz2ver}_RELEASE
+ # Apply pgo patches
+ patch -p0 $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/security/sandbox/linux/moz.build $srcdir/pgo-1.patch
+ patch -p0 $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/extensions/spellcheck/src/moz.build $srcdir/pgo-2.patch
+
cat >$srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/.mozconfig <<END
ac_add_options --enable-application=browser
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-hardening
-ac_add_options --enable-optimize
+ac_add_options --enable-optimize=-O3
ac_add_options --enable-rust-simd
ac_add_options --enable-lto
+ac_add_options --enable-linker=gold
export MOZ_PGO=1
-export CC=clang
-export CXX=clang++
-export AR=llvm-ar
-export NM=llvm-nm
-export RANLIB=llvm-ranlib
+export CC=gcc
+export CXX=g++
+export AR=gcc-ar
+export NM=gcc-nm
+export RANLIB=gcc-ranlib
# Branding
ac_add_options --enable-official-branding
diff --git a/pgo-1.patch b/pgo-1.patch
new file mode 100644
index 0000000..9f149e8
--- /dev/null
+++ b/pgo-1.patch
@@ -0,0 +1,15 @@
+--- a/security/sandbox/linux/moz.build
++++ b/security/sandbox/linux/moz.build
+@@ -99,9 +99,8 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
+ # 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.
+-for f in CONFIG['OS_CXXFLAGS']:
+- if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
+- LDFLAGS += ['--param lto-partitions=1']
++if CONFIG['CC_TYPE'] != 'clang':
++ LDFLAGS += ['--param', 'lto-partitions=1']
+
+ DEFINES['NS_NO_XPCOM'] = True
+ DisableStlWrapping()
+
diff --git a/pgo-2.patch b/pgo-2.patch
new file mode 100644
index 0000000..a55b635
--- /dev/null
+++ b/pgo-2.patch
@@ -0,0 +1,11 @@
+--- a/extensions/spellcheck/src/moz.build
++++ b/extensions/spellcheck/src/moz.build
+@@ -28,3 +28,8 @@ EXPORTS.mozilla += [
+
+ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+ CXXFLAGS += ['-Wno-error=shadow']
++
++# spell checker triggers bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88561
++# in gcc 7 and 8. It will be fixed in GCC 7.5 and 8.3
++if CONFIG['CC_TYPE'] in ('gcc'):
++ CXXFLAGS += ['-fno-devirtualize']