diff --git a/SPECS/firefox.spec b/SPECS/firefox.spec index 3873f31..9bdad7e 100644 --- a/SPECS/firefox.spec +++ b/SPECS/firefox.spec @@ -1,6 +1,12 @@ # Set for local builds only %global disable_toolsets 0 +%ifarch %{arm} +%if 0%{?rhel} == 8 +%undefine _debugsource_packages +%endif +%endif + # Use system nspr/nss? FIXME %if 0%{?rhel} == 8 %global system_nss 1 @@ -620,8 +626,12 @@ echo "ac_add_options --disable-optimize" >> .mozconfig %endif %ifarch armv7hl # ARMv7 need that (rhbz#1426850) +%if 0%{?rhel} == 8 +%global optimize_flags "-g0 -O2 -fno-schedule-insns -fno-lto" +%else %global optimize_flags "-g -O2 -fno-schedule-insns" %endif +%endif %ifarch ppc64le aarch64 %global optimize_flags "-g -O2" %endif @@ -936,11 +946,21 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') # (OOM when linking, rhbz#1238225) export MOZ_DEBUG_FLAGS=" " %endif +%ifarch %{arm} +%if 0%{?rhel} == 8 +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') +export MOZ_DEBUG_FLAGS=" " +%endif +%endif %ifarch s390 %{arm} ppc aarch64 i686 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif %ifarch %{arm} export RUSTFLAGS="-Cdebuginfo=0" +%if 0%{?rhel} == 8 +MOZ_LINK_FLAGS="-Wl,--no-keep-memory" +echo "ac_add_options --enable-linker=gold" >> .mozconfig +%endif %endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS