summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2020-07-30 01:52:35 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2020-07-30 01:52:35 -0700
commit3a142e340c64455c24faf6be3fbdff3c4b296490 (patch)
treefd5108b77049862ada38b995641e61a588876a51
parentUpdated to 78.0.2 (diff)
downloadfirefox-esr-3a142e340c64455c24faf6be3fbdff3c4b296490.tar.xz
Updated to 78.1.0
-rw-r--r--PKGBUILD30
-rw-r--r--mozconfig.in.clang4
-rw-r--r--mozconfig.in.clang.pgo4
-rw-r--r--rust-145.patch152
4 files changed, 172 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6e608a5..b3f1385 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
-# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Maintainer (Arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Aqua-sama <aqua@iserlohn-fortress.net>
# Contributor (Arch): Ionut Biru <ibiru@archlinux.org>
# Contributor (Arch): Jakub Schmidtke <sjakub@gmail.com>
@@ -19,7 +19,7 @@ _modclang=0
_pkgname=firefox
pkgname=${_pkgname}-esr
-pkgver=78.0.2
+pkgver=78.1.0
_pkgver=${pkgver}esr
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
@@ -30,7 +30,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)
+ python-setuptools python-psutil lld)
optdepends=('networkmanager: Location detection via available WiFi networks'
'libnotify: Notification integration'
'alsa-utils: ALSA support'
@@ -46,6 +46,7 @@ provides=(firefox)
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
+ rust-145.patch
$pkgname.desktop
distribution.ini
mozconfig.in
@@ -56,14 +57,15 @@ source=(
arc4_remove-health-reporting.patch
arc4_remove-system-addons.patch
)
-b2sums=('5bff46a7d80f8dc164a3355dd2d780ea943c4e77fd8de529e0a63c21b4ac4098ec08d3b201b0bfa3d4ca2c89267ada18aa0e91843ada9c205987e9e27944ca6a'
+b2sums=('7e51c68d48acf1985b40830382f1f9cd6dda769db73c601fd10fafad6fa627995ebc8207d4381eca41fddb62b977ee6253427e09915d2cefccd072abd808f51d'
'SKIP'
'e4cf5d0ddd2c7271f1723b5c313f0aa8a7bf2242fb301ceba1ab5a4dca655ca7b9461d0aaebe5eaccf84b2f7a4c4199cbb0c18eab2bdaff273fcb730ec27219e'
+ '56e9264effe081af3fe9e5432cb0ee5acbe80dead170439e72062b9c5f34411f5b9aa06d2de6055efb7cb36e59a70c0e1d094605de78a3a1f185478be442ef8d'
'1c3af4cc5199cf7b9f3aad9ceab98b3e8a3dc0d38f50896ed2f32ac648f1e904a1cdda5da559964885989edbfab4c4bf65448e9a0f71d946c77ec0ab5a6aff4c'
'877eda442eb4730600dccf209a6e961ad3122ab456bbfda4ff041e8493ebaaf96224ac218360931259ff4214482f6bf65b3a3052f977ade1a274f38ffd859535'
'1be3d28b1ab3db98308aaa32c036e519a5826257dec4652de8cf368a158d6956ffd4a4a56b6bb7c0386fbddda5ea2056b007825b0c5c72a963340ba37e14d309'
- '37bad485ac0ab9f3c47560a079ea62163936e1d79f4888e2ce82af08e0b99dc33434e46403f453ccf35fd219482043d649659d829705a404c566833e780a9060'
- '8a83555c9ea1f790ea22945d1b2f00eb7ba3f1b079e4593b5546ee2a0f8ac8dc293af09a5ca5b63bc202ea2feb2c4bdc57b026c5fea74dd214b6ad0ff78c1b3a'
+ '471d01a9d0914d8c1b62cd5ebe5c6ee319a28f3bc629b415bb39edaa280383919e09967ecaa3fdeab7bbce12ccba4e0440bf18474f538addc528672cee618e3a'
+ 'bd967166ec95f134114d26de85559c8e4a0d18a40ea63d1fc045897198274ed6e523bb320632395e9b5277eb122c49e41d989413a3a019f8a868f7ab7743dc0d'
'1e8cdc2968a78fa395b77b654496dbbf21d37308a7fd560ab5cff8dc092d9b5123c374af8a5a18dec7fd2a053f411a1478ebfd928365208d22042391da444b4b'
'087ea758132905cab848e3a13a13537b42f70ba3a8bfd1ef4e2933d3e874e94038b50ee583b9e7e0c7b7cc7c2cf570f7f613b661f47121b7bf207f433b939f3d'
'4c0f100c52721f9d9a840d7de1f1d5310578ef7fbc350c62341d96b2af23d8bcb774a289429693153635964860cbb05074149bf043941dec87a1d86655b4d4b6'
@@ -77,6 +79,10 @@ prepare() {
# https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1654465
+ patch -Np1 -i ../rust-145.patch || true
+ sed -e 's/1.31.0/1.38.0/' -i build/moz.configure/rust.configure
+
if [ "${_modclang}" != "1" ]; then
# Apply gcc pgo patches
patch -p0 $srcdir/${_pkgname}-${pkgver}/security/sandbox/linux/moz.build $srcdir/arc4_enable-pgo-for-gcc.patch
@@ -145,15 +151,11 @@ build() {
xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
./mach python build/pgo/profileserver.py
- if [[ ! -s merged.profdata ]]; then
- echo "No profile data produced."
- return 1
- fi
+ stat -c "Profile data found (%s bytes)" merged.profdata
+ test -s merged.profdata
- if [[ ! -s jarlog ]]; then
- echo "No jar log produced."
- return 1
- fi
+ stat -c "Jar log found (%s bytes)" jarlog
+ test -s jarlog
echo "Removing instrumented browser..."
./mach clobber
diff --git a/mozconfig.in.clang b/mozconfig.in.clang
index 0bdc3f7..416a422 100644
--- a/mozconfig.in.clang
+++ b/mozconfig.in.clang
@@ -7,8 +7,8 @@ ac_add_options --enable-release
ac_add_options --enable-optimize
ac_add_options --disable-hardening
ac_add_options --enable-rust-simd
-#ac_add_options --enable-linker=gold
-#ac_add_options --disable-elf-hack
+ac_add_options --enable-linker=lld
+ac_add_options --disable-elf-hack
#ac_add_options --enable-strip
#ac_add_options --enable-install-strip
export CC='clang --target=x86_64-unknown-linux-gnu'
diff --git a/mozconfig.in.clang.pgo b/mozconfig.in.clang.pgo
index 60cc618..bb1aa38 100644
--- a/mozconfig.in.clang.pgo
+++ b/mozconfig.in.clang.pgo
@@ -7,8 +7,8 @@ ac_add_options --enable-release
ac_add_options --enable-optimize
ac_add_options --disable-hardening
ac_add_options --enable-rust-simd
-#ac_add_options --enable-linker=gold
-#ac_add_options --disable-elf-hack
+ac_add_options --enable-linker=lld
+ac_add_options --disable-elf-hack
#ac_add_options --enable-strip
#ac_add_options --enable-install-strip
export CC='clang --target=x86_64-unknown-linux-gnu'
diff --git a/rust-145.patch b/rust-145.patch
new file mode 100644
index 0000000..dc50625
--- /dev/null
+++ b/rust-145.patch
@@ -0,0 +1,152 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1595885037 0
+# Node ID e5d2a6d5187b8f1420b65089c4d841ec29a42897
+# Parent 32b46b511b324eed23acae9bfdede2e2ca3d42fa
+Bug 1654465 - Set -Cembed-bitcode=yes instead of CARGO_PROFILE_RELEASE_LTO. r=firefox-build-system-reviewers,rstewart
+
+It turns out setting CARGO_PROFILE_RELEASE_LTO has unwanted side
+effects.
+
+First it's not actually strictly equivalent to using `cargo rustc --
+-Clto`. For instance, it apparently also enables cross-language LTO in
+newer versions of cargo.
+
+Second, it changes the rust computed hash for all the dependencies of
+the crate being built with the variable set, which makes them diverge
+from when the same dependencies are built through another crate in the
+tree that is not LTOed. This effectively makes us build a _lot_ of
+crates twice, many of which are not cacheable.
+
+Since the original problem is that cargo >= 1.45 passes extra flags (`-C
+embed-bitcode=no`) to rustc that are incompatible with `-Clto`, and while
+it knows to adjust based on the `lto` setting in the build profile
+(which CARGO_PROFILE_RELEASE_LTO overrides the default of), cargo
+ignores flags passed via `cargo rustc -- ...` when making those
+adjustments.
+
+So, we need to override with `-C embed-bitcode=yes` on our own at the
+same time we pass `-Clto`. But doing that through `cargo rustc -- ...`
+is not enough because all the dependencies of the crate built with
+`-Clto` need to be built with `-C embed-bitcode=yes`. So we need to
+override with `RUSTFLAGS`, which will affect all the dependencies.
+But we also need to do this consistently across all crates, not only the
+dependencies of crates built with `-Clto`, otherwise we'd still end up
+building crates twice (once with and once without the override).
+
+Unfortunately, the `-C embed-bitcode=*` flag is also not supported in
+versions older than 1.45, so we have to avoid adding it on older
+versions.
+
+We unfortunately support a large range of versions of rustc (albeit only
+for tools/crashreporter), but we actually need to upgrade the smaller
+supported version because rustc < 1.38 doesn't support our top-level
+Cargo.lock. This makes the version check slightly less awful.
+
+Differential Revision: https://phabricator.services.mozilla.com/D84652
+
+diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -142,17 +142,17 @@ def rust_compiler(rustc_info, cargo_info
+ Rust compiler not found.
+ To compile rust language sources, you must have 'rustc' in your path.
+ See https://www.rust-lang.org/ for more information.
+
+ You can install rust by running './mach bootstrap'
+ or by directly running the installer from https://rustup.rs/
+ '''))
+ if build_project == 'tools/crashreporter':
+- rustc_min_version = Version('1.31.0')
++ rustc_min_version = Version('1.38.0')
+ else:
+ rustc_min_version = Version(MINIMUM_RUST_VERSION)
+ cargo_min_version = rustc_min_version
+
+ version = rustc_info.version
+ if version < rustc_min_version:
+ die(dedent('''\
+ Rust compiler {} is too old.
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -56,21 +56,22 @@ endif
+ # These flags are passed via `cargo rustc` and only apply to the final rustc
+ # invocation (i.e., only the top-level crate, not its dependencies).
+ cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
+ ifndef DEVELOPER_OPTIONS
+ ifndef MOZ_DEBUG_RUST
+ # Enable link-time optimization for release builds, but not when linking
+ # gkrust_gtest.
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+-# Pass -Clto for older versions of rust, and CARGO_PROFILE_RELEASE_LTO=true
+-# for newer ones that support it. Combining the latter with -Clto works, so
+-# set both everywhere.
+ cargo_rustc_flags += -Clto
+-export CARGO_PROFILE_RELEASE_LTO=true
++endif
++# Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when
++# using -Clto.
++ifeq (,$(filter 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION)))
++RUSTFLAGS += -Cembed-bitcode=yes
+ endif
+ endif
+ endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
+ endif
+
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
++++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+@@ -1793,23 +1793,16 @@ class RustTest(BaseConfigureTest):
+ self.assertEqual(
+ self.get_rust_target('arm-unknown-linux-androideabi',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')),
+ 'thumbv7neon-linux-androideabi')
+
+ self.assertEqual(
+ self.get_rust_target('arm-unknown-linux-androideabi',
+- version='1.32.0',
+- arm_target=ReadOnlyNamespace(
+- arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')),
+- 'armv7-linux-androideabi')
+-
+- self.assertEqual(
+- self.get_rust_target('arm-unknown-linux-androideabi',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='neon', thumb2=False, float_abi='softfp')),
+ 'armv7-linux-androideabi')
+
+ self.assertEqual(
+ self.get_rust_target('arm-unknown-linux-androideabi',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='vfpv2', thumb2=True, float_abi='softfp')),
+@@ -1818,23 +1811,16 @@ class RustTest(BaseConfigureTest):
+ self.assertEqual(
+ self.get_rust_target('armv7-unknown-linux-gnueabihf',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')),
+ 'thumbv7neon-unknown-linux-gnueabihf')
+
+ self.assertEqual(
+ self.get_rust_target('armv7-unknown-linux-gnueabihf',
+- version='1.32.0',
+- arm_target=ReadOnlyNamespace(
+- arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')),
+- 'armv7-unknown-linux-gnueabihf')
+-
+- self.assertEqual(
+- self.get_rust_target('armv7-unknown-linux-gnueabihf',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='neon', thumb2=False, float_abi='hard')),
+ 'armv7-unknown-linux-gnueabihf')
+
+ self.assertEqual(
+ self.get_rust_target('armv7-unknown-linux-gnueabihf',
+ arm_target=ReadOnlyNamespace(
+ arm_arch=7, fpu='vfpv2', thumb2=True, float_abi='hard')),
+