From 4dc43e7ccf2457afa3248e5c3927b8176841db13 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 4 Jul 2023 10:04:11 +0200 Subject: [PATCH] Disabled LTO due to rhbz#2218885 --- firefox-gcc-always-inline.patch | 36 +++++++++++++-------------------- firefox.spec | 7 ++++--- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/firefox-gcc-always-inline.patch b/firefox-gcc-always-inline.patch index d7ce687..d7af60f 100644 --- a/firefox-gcc-always-inline.patch +++ b/firefox-gcc-always-inline.patch @@ -1,22 +1,14 @@ -diff -up firefox-115.0/gfx/skia/generate_mozbuild.py.old firefox-115.0/gfx/skia/generate_mozbuild.py ---- firefox-115.0/gfx/skia/generate_mozbuild.py.old 2023-07-03 15:45:48.324343303 +0200 -+++ firefox-115.0/gfx/skia/generate_mozbuild.py 2023-07-03 15:46:03.098854139 +0200 -@@ -54,7 +54,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind - if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] - SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] - if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -diff -up firefox-115.0/gfx/skia/moz.build.old firefox-115.0/gfx/skia/moz.build ---- firefox-115.0/gfx/skia/moz.build.old 2023-07-03 15:45:29.988709343 +0200 -+++ firefox-115.0/gfx/skia/moz.build 2023-07-03 15:45:39.971054486 +0200 -@@ -565,7 +565,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind - if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] - SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] - if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/firefox.spec b/firefox.spec index 60069b6..b6d36df 100644 --- a/firefox.spec +++ b/firefox.spec @@ -719,7 +719,8 @@ export CCACHE_DISABLE=1 export GCOV_PREFIX=`pwd -P`/objdir export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV -echo "ac_add_options --enable-lto" >> .mozconfig +# Disabled due to rhbz#2218885 +#echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif @@ -735,7 +736,6 @@ cp %{SOURCE45} . . ./run-wayland-compositor %endif -export MACH_NATIVE_PACKAGE_SOURCE=system mkdir -p objdir/_virtualenvs/init_py3 cat > objdir/_virtualenvs/init_py3/pip.conf << EOF [global] @@ -759,7 +759,7 @@ xvfb-run ./mach build -v 2>&1 | cat - || exit 1 %install # run Firefox test suite # Do we need it? -export MACH_NATIVE_PACKAGE_SOURCE=system +# export MACH_NATIVE_PACKAGE_SOURCE=system %if %{launch_wayland_compositor} cp %{SOURCE45} . . ./run-wayland-compositor @@ -1058,6 +1058,7 @@ fi %changelog * Thu Jun 29 2023 Martin Stransky - 115.0-2 - Update to 115.0 +- Disabled LTO due to rhbz#2218885 * Thu Jun 29 2023 Martin Stransky - 114.0.2-3 - Enable Elf-hack for PGO builds.