From 05a1866dff16a4c73feb3a9bebe17f6a407b4b55 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Tue, 25 Aug 2020 11:00:21 -0700 Subject: Updated to 78.2.0 --- PKGBUILD | 29 ++----- arc4_remove-health-reporting.patch | 6 +- mozconfig.common.override | 5 +- mozconfig.in | 5 +- rust-145.patch | 152 ------------------------------------- 5 files changed, 19 insertions(+), 178 deletions(-) delete mode 100644 rust-145.patch diff --git a/PKGBUILD b/PKGBUILD index b3f1385..28918af 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,9 +19,9 @@ _modclang=0 _pkgname=firefox pkgname=${_pkgname}-esr -pkgver=78.1.0 +pkgver=78.2.0 _pkgver=${pkgver}esr -pkgrel=1 +pkgrel=1.2 pkgdesc="Standalone web browser from mozilla.org" arch=(x86_64 aarch64) license=(MPL GPL LGPL) @@ -46,7 +46,6 @@ 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 @@ -57,18 +56,17 @@ source=( arc4_remove-health-reporting.patch arc4_remove-system-addons.patch ) -b2sums=('7e51c68d48acf1985b40830382f1f9cd6dda769db73c601fd10fafad6fa627995ebc8207d4381eca41fddb62b977ee6253427e09915d2cefccd072abd808f51d' +b2sums=('bd16877d078de66a418ae114c534b26313f112b9e40ad5cf112fb07a4d7335dc47071ee6e959e3e4c179b95afbdc5ab9cda7cdefa96355dbbaf6b75c7805d171' 'SKIP' 'e4cf5d0ddd2c7271f1723b5c313f0aa8a7bf2242fb301ceba1ab5a4dca655ca7b9461d0aaebe5eaccf84b2f7a4c4199cbb0c18eab2bdaff273fcb730ec27219e' - '56e9264effe081af3fe9e5432cb0ee5acbe80dead170439e72062b9c5f34411f5b9aa06d2de6055efb7cb36e59a70c0e1d094605de78a3a1f185478be442ef8d' '1c3af4cc5199cf7b9f3aad9ceab98b3e8a3dc0d38f50896ed2f32ac648f1e904a1cdda5da559964885989edbfab4c4bf65448e9a0f71d946c77ec0ab5a6aff4c' '877eda442eb4730600dccf209a6e961ad3122ab456bbfda4ff041e8493ebaaf96224ac218360931259ff4214482f6bf65b3a3052f977ade1a274f38ffd859535' - '1be3d28b1ab3db98308aaa32c036e519a5826257dec4652de8cf368a158d6956ffd4a4a56b6bb7c0386fbddda5ea2056b007825b0c5c72a963340ba37e14d309' + '44fdd3e403376f9602341781e2bc632c03be2d5c44d91b66b674ff1056cc80e78dccbfb5895282e60d508025bea6871d42bfc5a0a80ba2360df165bce91ed50d' '471d01a9d0914d8c1b62cd5ebe5c6ee319a28f3bc629b415bb39edaa280383919e09967ecaa3fdeab7bbce12ccba4e0440bf18474f538addc528672cee618e3a' 'bd967166ec95f134114d26de85559c8e4a0d18a40ea63d1fc045897198274ed6e523bb320632395e9b5277eb122c49e41d989413a3a019f8a868f7ab7743dc0d' - '1e8cdc2968a78fa395b77b654496dbbf21d37308a7fd560ab5cff8dc092d9b5123c374af8a5a18dec7fd2a053f411a1478ebfd928365208d22042391da444b4b' + '1c7ac58af8b817067c7d79ffef8d9100f513d77f4fc1a2bce2684ff8d8d3cbc3d37b31865c7e5d873fd71d4649374bbd25ca08166d8afb25ffbd597759655063' '087ea758132905cab848e3a13a13537b42f70ba3a8bfd1ef4e2933d3e874e94038b50ee583b9e7e0c7b7cc7c2cf570f7f613b661f47121b7bf207f433b939f3d' - '4c0f100c52721f9d9a840d7de1f1d5310578ef7fbc350c62341d96b2af23d8bcb774a289429693153635964860cbb05074149bf043941dec87a1d86655b4d4b6' + '020695637162ce981929f54ea556100bf17e92931179a5849ca8265dfc0016f1b6599d9f77e9f71f192a1a4bb3b2d1eadbf5d5554e6c33bfa3f9388b0a3c7c6e' '635a84c64ea9dccf41fbde33b58a72a8123ecd841995ad045bd329e23855f56ffce05670fe2d69a12c4cef7a7399bc6becfc5f40bfd8cea9a4006074672a634d') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases @@ -79,10 +77,6 @@ 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 @@ -135,10 +129,6 @@ build() { # clang does not support -fstack-clash-protection, so remove it export CFLAGS="$(echo $CFLAGS | sed 's/ -fstack-clash-protection//' - )" export CXXFLAGS="$(echo $CXXFLAGS | sed 's/ -fstack-clash-protection//' - )" -# # -fno-plt with cross-LTO causes obscure LLVM errors -# # LLVM ERROR: Function Import: link error -# CFLAGS="${CFLAGS/-fno-plt/}" -# CXXFLAGS="${CXXFLAGS/-fno-plt/}" # Do 3-tier PGO echo "Building instrumented browser..." @@ -166,15 +156,13 @@ build() { cat >.mozconfig - < -# 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')), - -- cgit v1.2.1