From 2764c59751f14dd438700bf77d7489ae83fccb5e983113a79d407cad69e9dcc1 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 8 Feb 2022 08:38:01 +0000 Subject: [PATCH] Accepting request 952269 from home:dirkmueller:Factory - remove memoryperjob and use %limit instead. this allows to adapt to more worker types, and lowers the time the package is stuck in "scheduling". raising memory above 8 to lower risk for LTO jobs to run OOM - add hack to disable -Wl,--gc-section which avoids a binutils segfault on x86 - change mozilla-reduce-rust-debuginfo.patch: use -g1 everywhere OBS-URL: https://build.opensuse.org/request/show/952269 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=957 --- MozillaFirefox.changes | 11 +++++++++++ MozillaFirefox.spec | 8 ++++---- _constraints | 20 +++++++++++++++----- mozilla-reduce-rust-debuginfo.patch | 29 ++++++----------------------- 4 files changed, 36 insertions(+), 32 deletions(-) diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 9e37a701..92be2a4b 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Feb 7 22:21:29 UTC 2022 - Dirk Müller + +- remove memoryperjob and use %limit instead. this allows to + adapt to more worker types, and lowers the time the package + is stuck in "scheduling". raising memory above 8 to lower + risk for LTO jobs to run OOM +- add hack to disable -Wl,--gc-section which avoids a binutils + segfault on x86 +- change mozilla-reduce-rust-debuginfo.patch: use -g1 everywhere + ------------------------------------------------------------------- Sun Jan 30 23:58:34 UTC 2022 - Dirk Müller diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 37b94e96..3d8e02f6 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -381,6 +381,8 @@ export CFLAGS="$CFLAGS -fimplicit-constexpr" %ifarch %arm %ix86 # Limit RAM usage during link export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +# A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer +export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes %endif export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" %ifarch ppc64 ppc64le @@ -408,9 +410,7 @@ echo "export MOZ_TELEMETRY_REPORTING=1" echo "" cat << EOF %else -%ifarch aarch64 ppc64 ppc64le x86_64 -%limit_build -m 2048 -%endif +%limit_build -m 2560 cat << EOF > $MOZCONFIG %endif mk_add_options MOZILLA_OFFICIAL=1 @@ -433,8 +433,8 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --disable-debug-symbols %else ac_add_options --enable-debug-symbols=-g1 -ac_add_options --disable-install-strip %endif +ac_add_options --disable-install-strip # building with elf-hack started to fail everywhere with FF73 #%if 0%{?suse_version} > 1549 %ifnarch aarch64 ppc64 ppc64le s390x diff --git a/_constraints b/_constraints index f6f9e270..9ebe972d 100644 --- a/_constraints +++ b/_constraints @@ -3,14 +3,11 @@ 4 - 24 + 26 - 8 + 15 - - 1536 - @@ -26,4 +23,17 @@ + + + + aarch64 + ppc64le + s390x + + + + 8 + + + diff --git a/mozilla-reduce-rust-debuginfo.patch b/mozilla-reduce-rust-debuginfo.patch index 7695b856..620f178e 100644 --- a/mozilla-reduce-rust-debuginfo.patch +++ b/mozilla-reduce-rust-debuginfo.patch @@ -1,28 +1,11 @@ -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 -@@ -610,6 +610,7 @@ set_config("CARGO_PROFILE_DEV_OPT_LEVEL" - "--enable-frame-pointers", - path_remapping, - path_remappings, -+ host - ) - def rust_compile_flags( - opt_level, -@@ -619,6 +620,7 @@ def rust_compile_flags( - frame_pointers, - path_remapping, - path_remappings, -+ host - ): - # Cargo currently supports only two interesting profiles for building: - # development and release. Those map (roughly) to --enable-debug and -@@ -642,6 +644,8 @@ def rust_compile_flags( +--- firefox-96.0.3.orig/build/moz.configure/rust.configure ++++ firefox-96.0.3/build/moz.configure/rust.configure +@@ -641,7 +643,7 @@ def rust_compile_flags( + debug_assertions = False if debug_symbols: - debug_info = "2" -+ if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64' or host.cpu == 's390x': -+ debug_info = '1' +- debug_info = "2" ++ debug_info = '1' opts = []