From ae9afbb746e2933200f3737bdd402cf5b81b2ba40c928fd812b3e97976ed7073 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 8 Dec 2020 10:41:13 +0000 Subject: [PATCH] Accepting request 853750 from home:marxin:branches:mozilla:Factory - Add fix-gcc-pgo.patch and enable PGO again. OBS-URL: https://build.opensuse.org/request/show/853750 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=878 --- MozillaFirefox.changes | 5 +++++ MozillaFirefox.spec | 5 +++-- fix-gcc-pgo.patch | 12 ++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 fix-gcc-pgo.patch diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 61b30c9..e49a422 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 8 09:50:23 UTC 2020 - Martin Liška + +- Add fix-gcc-pgo.patch and enable PGO again. + ------------------------------------------------------------------- Thu Dec 3 09:48:04 UTC 2020 - Martin Liška diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index e239330..076babb 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -37,8 +37,7 @@ %define branding 1 %define devpkg 1 -# PGO builds do not work in TW currently (bmo#1642410) -%define do_profiling 0 +%define do_profiling 1 # upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 @@ -216,6 +215,7 @@ Patch29: revert-795c8762b16b.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch +Patch103: fix-gcc-pgo.patch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils shared-mime-info desktop-file-utils @@ -358,6 +358,7 @@ cd $RPM_BUILD_DIR/%{srcname}-%{orig_version} # Firefox %patch101 -p1 %patch102 -p1 +%patch103 -p1 %endif %build diff --git a/fix-gcc-pgo.patch b/fix-gcc-pgo.patch new file mode 100644 index 0000000..ee17913 --- /dev/null +++ b/fix-gcc-pgo.patch @@ -0,0 +1,12 @@ +--- ./build/pgo/profileserver.py 2020-12-02 15:34:46.453053287 +0100 ++++ ./build/pgo/profileserver.py 2020-12-02 15:34:57.988970433 +0100 +@@ -203,7 +203,8 @@ + sys.exit(1) + + llvm_profdata = env.get('LLVM_PROFDATA') +- if llvm_profdata: ++ cc = env.get('CC') ++ if llvm_profdata and not 'gcc' in cc: + profraw_files = glob.glob('*.profraw') + if not profraw_files: + print('Could not find profraw files in the current directory: %s' % os.getcwd())