From fc6d180230a96524529cd5686d4201a68d5daa6c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:07:14 +0200 Subject: [PATCH 1/3] Drop arm build conditionals F36 was the last release that supported 32 bit arm architectures and F36 just reached EOL. --- firefox.spec | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/firefox.spec b/firefox.spec index ed2a8e2..50c4701 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,14 +40,6 @@ ExcludeArch: i686 %global build_with_clang 0 %endif -%ifarch armv7hl -%global create_debuginfo 0 - -# always use clang for arm builds -%global toolchain clang -%global build_with_clang 1 -%endif - # Temporary disabled due to # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 @@ -67,11 +59,7 @@ ExcludeArch: i686 %endif %global system_ffi 1 -%ifarch armv7hl -%global system_libvpx 1 -%else %global system_libvpx 0 -%endif %global system_jpeg 1 %global system_pixman 1 %global use_bundled_cbindgen 1 @@ -148,12 +136,9 @@ ExcludeArch: i686 %if !%{release_build} %global pre_tag .npgo %endif -# Don't use 'clang' suffix on arm -%ifnarch %{arm} %if %{build_with_clang} %global pre_tag .clang %endif -%endif %if %{build_with_asan} %global pre_tag .asan %global build_with_pgo 0 @@ -582,7 +567,7 @@ echo "ac_add_options --with-system-libevent" >> .mozconfig echo "ac_add_options --enable-system-ffi" >> .mozconfig %endif -%ifarch %{arm} aarch64 +%ifarch aarch64 echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif @@ -703,7 +688,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-O2//') # If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which # overrides the -g1 from line above and breaks building on s390/arm # (OOM when linking, rhbz#1238225) -%ifarch %{arm} %{ix86} +%ifarch %{ix86} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g0/') export MOZ_DEBUG_FLAGS=" " %endif @@ -712,12 +697,8 @@ MOZ_LINK_FLAGS="%{build_ldflags}" %ifarch aarch64 %{ix86} MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -%ifarch %{arm} -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--strip-debug" -echo "ac_add_options --enable-linker=gold" >> .mozconfig %endif -%endif -%ifarch %{arm} %{ix86} s390x +%ifarch %{ix86} s390x export RUSTFLAGS="-Cdebuginfo=0" %endif %if %{build_with_asan} @@ -725,16 +706,6 @@ MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fsanitize=address -Dxmalloc=myxmalloc" MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -fsanitize=address -ldl" %endif -%ifarch %{arm} -# disable hard-coded LTO due to RAM constraints -sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk -sed -i '/RUSTFLAGS += -Cembed-bitcode=yes/d' config/makefiles/rust.mk -sed -i 's/codegen-units=1/codegen-units=16/' config/makefiles/rust.mk - -# make sure "-g0" is the last flag so there's no debug info -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -g0" -%endif - # We don't wantfirefox to use CK_GCM_PARAMS_V3 in nss MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -DNSS_PKCS11_3_0_STRICT" From 7f69d4c3f08e4485d2b1030095b4d45c606228b5 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:15:02 +0200 Subject: [PATCH 2/3] Drop an arm-specific patch We don't build for 32 bit arm any more now that F36 is EOL. --- firefox.spec | 4 ---- work-around-GCC-ICE-on-arm.patch | 12 ------------ 2 files changed, 16 deletions(-) delete mode 100644 work-around-GCC-ICE-on-arm.patch diff --git a/firefox.spec b/firefox.spec index 50c4701..5ba0942 100644 --- a/firefox.spec +++ b/firefox.spec @@ -246,9 +246,6 @@ Patch412: D178251.diff Patch600: pgo.patch Patch602: mozilla-1516803.patch -# a patch for compiling with gcc on arm (from debian) -Patch990: work-around-GCC-ICE-on-arm.patch - # Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202) Patch1100: mozilla-1775202.patch @@ -534,7 +531,6 @@ This package contains results of tests executed during build. %endif %endif -%patch990 -p1 -b .work-around-GCC-ICE-on-arm %patch1100 -p1 -b .ppc-mobzuild %patch1200 -p1 -b .rustflags-commasplit diff --git a/work-around-GCC-ICE-on-arm.patch b/work-around-GCC-ICE-on-arm.patch deleted file mode 100644 index b65c647..0000000 --- a/work-around-GCC-ICE-on-arm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h ---- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2022-05-27 08:37:14.642698922 +0300 -+++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2022-05-27 12:23:43.592185545 +0300 -@@ -683,7 +683,7 @@ - // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3) - // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops(). - #if 1 && defined(__GNUC__) && !defined(__clang__) \ -- && (defined(__mips64) || defined(__i386) || defined(__s390x__)) -+ && (defined(__arm__) || defined(__mips64) || defined(__i386) || defined(__s390x__)) - #define MAYBE_NOINLINE __attribute__((noinline)) - #else - #define MAYBE_NOINLINE From d693ba16a52d779bc76e74c5d6ab02ae5a8866b6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:16:17 +0200 Subject: [PATCH 3/3] Drop F37 build conditionals Now that F36 is EOL, we can get rid of ">= 37" conditionals that always evaluate to true. --- firefox.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index 5ba0942..c8f345b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -21,13 +21,9 @@ ExcludeArch: i686 # as the build is *very* slow. %global debug_build 0 -# See rhbz#2134527 - Use portal Gtk file dialog on Fedora 37+ +# See rhbz#2134527 - Use portal Gtk file dialog # Disabled due to various issues now. -%if 0%{?fedora} >= 37 %global use_xdg_file_portal 0 -%else -%global use_xdg_file_portal 0 -%endif %global system_nss 1 %global system_libevent 1 @@ -128,10 +124,8 @@ ExcludeArch: i686 %bcond_without langpacks %if %{with langpacks} -%if 0%{?fedora} >= 37 %bcond_without langpacks_subpkg %endif -%endif %if !%{release_build} %global pre_tag .npgo