summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD72
1 files changed, 65 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 00716d5..1a1fdbb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,10 +16,11 @@
_modclang=0
#_modclang=1 # FIXME
+_testgcc=0
pkgname=firefox
-pkgver=80.0
-pkgrel=1
+pkgver=81.0
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org"
arch=(x86_64 aarch64)
license=(MPL GPL LGPL)
@@ -28,7 +29,7 @@ depends=(gtk3 libxt mime-types dbus-glib ffmpeg ttf-font libpulse alsa-lib
bzip2 libffi icu libjpeg-turbo libevent libvpx nspr nss pixman libpng sqlite libwebp zlib)
makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb
autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm
- python-setuptools python-psutil lld)
+ python-setuptools python-psutil python-zstandard lld)
optdepends=('networkmanager: Location detection via available WiFi networks'
'libnotify: Notification integration'
'alsa-utils: ALSA support'
@@ -43,26 +44,34 @@ conflicts=(firefox-esr)
source=(
"https://archive.mozilla.org/pub/$pkgname/releases/$pkgver/source/$pkgname-$pkgver.source.tar.xz"{,.asc}
0001-Use-remoting-name-for-GDK-application-names.patch
+ 0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
+ 0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
$pkgname.desktop
distribution.ini
mozconfig.in
+ mozconfig.in.pgo
mozconfig.in.clang
mozconfig.in.clang.pgo
mozconfig.common.override
+ arc4_enable-lto-for-gcc.patch
arc4_enable-pgo-for-gcc.patch
arc4_remove-health-reporting.patch
arc4_remove-system-addons.patch
)
-b2sums=('3099426b27cd3c89b63be7d796c8c5a87d0ee9bd8252e5bde23ed3a61f71d611e7427ffee506224e81a88ef109eefe944f2cf3367bd636a6ed46b7351d0a4b1b'
+b2sums=('0546bad15aa89a7e4d2ca0cc000fed2170b9529f8f2cc1c1c4907649ffbcf72e8ee800083b63a767fc07b643cacb298b424ebc1ce827de209f366716e3a5135b'
'SKIP'
- 'e4cf5d0ddd2c7271f1723b5c313f0aa8a7bf2242fb301ceba1ab5a4dca655ca7b9461d0aaebe5eaccf84b2f7a4c4199cbb0c18eab2bdaff273fcb730ec27219e'
+ '870f33f4dcb411e3aa2f94c5068bccad0f07a5c4a6b5356fc55ba363bdc2ff8ba8b76d507618b7349ae190ed09deadf4c0b8b500a6692f76cd01e7f83411a2db'
+ '799ff9c88aafde5c60d852c9c9006090adce002f558985c95d5759e34aec9f6713298d3ff7e9220183053f932d8c7d849d0b715d66315ae58bc21aef891d136a'
+ '32b1b153c3affb5a6b92425813d565124603e09a654f23347206f2cbf6f928377385917312c100b8c19a556fe75066499fb5b2fe15a2fd2cf569963df12ff1c3'
'e18f2c22e394ca3b6758bc130245b254947e4d15921be3da443d6d7c3c4b0d22ead1b39fbc10a4f896edd19e2a1dffbd1cbb34dc4beb0621a6ddb70ccc53b3a7'
'877eda442eb4730600dccf209a6e961ad3122ab456bbfda4ff041e8493ebaaf96224ac218360931259ff4214482f6bf65b3a3052f977ade1a274f38ffd859535'
- '83eb896637669476878c45c68ce5c30da106cc60b41eb4944f39007f6b4a37e6b70e5ca0afedb7dba6e5fc765b4dc10c12960cd4e449a6c4e864e4179bbfb166'
+ 'f8b01cf39b9e149f1acfd1c68ab55028f758a139f972138dbd51a423633f31bdaaa08acf785e81e16a4c2353f322a8917cd07a0fb706093b4019ecca0bd7673f'
+ '08d4e0768c2323b4905b3ba539594e88132b487a4eac2ab61df36020fe6f933c338afba918aea0becd10ecf29795bf94146cefc4f6b111ea658a20fdf6e899cd'
'aa87016dabc182a4da3db1f29f4a6b274095be883febf848ddbe86615639b6a85f12b2c78ce6b18bba18516982330fb775083f4bab330738d95ee26d70f02dfa'
'ffb7ca117004a084b1bd7baed6a11b0914ec391459d662fc8887edc3206eb25c41b09f713e9bfe0ed474333d9537295842b0617dd29e9ce222fde548cd9111aa'
'1c7ac58af8b817067c7d79ffef8d9100f513d77f4fc1a2bce2684ff8d8d3cbc3d37b31865c7e5d873fd71d4649374bbd25ca08166d8afb25ffbd597759655063'
'087ea758132905cab848e3a13a13537b42f70ba3a8bfd1ef4e2933d3e874e94038b50ee583b9e7e0c7b7cc7c2cf570f7f613b661f47121b7bf207f433b939f3d'
+ '1250b2d4a713b241d9768dc386ecf9130d295587efd5070c2e494185436ca9d99a465b97ed80fe23ab14d6d07ecde8537a3a3d11ba843c4e3791b4df52e08f27'
'020695637162ce981929f54ea556100bf17e92931179a5849ca8265dfc0016f1b6599d9f77e9f71f192a1a4bb3b2d1eadbf5d5554e6c33bfa3f9388b0a3c7c6e'
'635a84c64ea9dccf41fbde33b58a72a8123ecd841995ad045bd329e23855f56ffce05670fe2d69a12c4cef7a7399bc6becfc5f40bfd8cea9a4006074672a634d')
validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases
@@ -74,14 +83,27 @@ prepare() {
# https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch
+ # https://bugs.archlinux.org/task/67978
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1660901
+ patch -Np1 -i ../0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
+ patch -Np1 -i ../0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
+
if [ "${_modclang}" != "1" ]; then
# Apply gcc pgo patches
+ patch -p0 $srcdir/${pkgname}-${pkgver}/security/sandbox/linux/moz.build $srcdir/arc4_enable-lto-for-gcc.patch
+ fi
+
+ if [ "${_testgcc}" == "1" ]; then
+ # Apply gcc pgo patches
patch -p0 $srcdir/${pkgname}-${pkgver}/security/sandbox/linux/moz.build $srcdir/arc4_enable-pgo-for-gcc.patch
fi
if [ "${_modclang}" == "1" ]; then
- # Add the custom mozconfig for pgo
+ # Add the custom mozconfig for clang pgo
cp $srcdir/mozconfig.in.clang.pgo $srcdir/${pkgname}-${pkgver}/.mozconfig
+ elif [ "${_testgcc}" == "1" ]; then
+ # Add the custom mozconfig for gcc pgo
+ cp $srcdir/mozconfig.in.pgo $srcdir/${pkgname}-${pkgver}/.mozconfig
else
# Add the custom mozconfig
cp $srcdir/mozconfig.in $srcdir/${pkgname}-${pkgver}/.mozconfig
@@ -115,13 +137,16 @@ build() {
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
+ export MACH_USE_SYSTEM_PYTHON=1
+ # -flto breaks cargo
export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIC"
export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIC"
# LTO needs more open files
ulimit -n 4096
+
if [ "${_modclang}" == "1" ]; then
# clang does not support -fstack-clash-protection, so remove it
export CFLAGS="$(echo $CFLAGS | sed 's/ -fstack-clash-protection//' - )"
@@ -156,6 +181,39 @@ ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
mk_add_options MOZ_OBJDIR=${PWD@Q}/obj
END
./mach build
+
+ elif [ "${_testgcc}" == "1" ]; then
+
+ # Do 3-tier PGO
+ echo "Building instrumented browser..."
+ ./mach build
+
+ echo "Profiling instrumented browser..."
+ ./mach package
+ LLVM_PROFDATA=llvm-profdata \
+ JARLOG_FILE="$PWD/jarlog" \
+ xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
+ ./mach python build/pgo/profileserver.py
+
+ stat -c "Profile data found (%s bytes)" merged.profdata
+ test -s merged.profdata
+
+ stat -c "Jar log found (%s bytes)" jarlog
+ test -s jarlog
+
+ echo "Removing instrumented browser..."
+ ./mach clobber
+
+ echo "Building optimized browser..."
+ # Add the custom mozconfig
+ cp $srcdir/mozconfig.in $srcdir/${pkgname}-${pkgver}/.mozconfig
+ cat >.mozconfig - <<END
+ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
+ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
+mk_add_options MOZ_OBJDIR=${PWD@Q}/obj
+END
+ ./mach build
+
else
echo "Building optimized browser..."
xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" ./mach build