public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jory Pratt" <anarchy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/files/, www-client/firefox/
Date: Fri, 14 Feb 2020 02:34:30 +0000 (UTC)	[thread overview]
Message-ID: <1581647663.49a458e4b89270bb410f8bda5b31713f10e766bf.anarchy@gentoo> (raw)

commit:     49a458e4b89270bb410f8bda5b31713f10e766bf
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 02:34:23 2020 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Fri Feb 14 02:34:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=49a458e4

www-client/firefox: Fix lto/pgo build

Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 .../firefox/files/firefox-69.0-lto-gcc-fix.patch   | 26 -----------
 .../files/firefox-73.0_fix_lto_pgo_builds.patch    | 51 ++++++++++++++++++++++
 www-client/firefox/firefox-73.0.ebuild             |  2 +
 3 files changed, 53 insertions(+), 26 deletions(-)

diff --git a/www-client/firefox/files/firefox-69.0-lto-gcc-fix.patch b/www-client/firefox/files/firefox-69.0-lto-gcc-fix.patch
deleted file mode 100644
index 9fe9673..0000000
--- a/www-client/firefox/files/firefox-69.0-lto-gcc-fix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# HG changeset patch
-# Parent  79ae951dc72ba16a2451c4cde7298aa986376b0c
-Fix lto builds of sandbox on linux
-
-diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
---- a/security/sandbox/linux/moz.build
-+++ b/security/sandbox/linux/moz.build
-@@ -95,17 +95,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
-     CXXFLAGS += ['-Wno-shadow']
-     SOURCES['../chromium/sandbox/linux/services/syscall_wrappers.cc'].flags += [
-         '-Wno-empty-body',
-     ]
- 
- # gcc lto likes to put the top level asm in syscall.cc in a different partition
- # from the function using it which breaks the build.  Work around that by
- # forcing there to be only one partition.
--for f in CONFIG['OS_CXXFLAGS']:
-+for f in CONFIG['MOZ_LTO_CFLAGS']:
-     if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
-         LDFLAGS += ['--param', 'lto-partitions=1']
- 
- DEFINES['NS_NO_XPCOM'] = True
- DisableStlWrapping()
- 
- LOCAL_INCLUDES += ['/security/sandbox/linux']
- LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']

diff --git a/www-client/firefox/files/firefox-73.0_fix_lto_pgo_builds.patch b/www-client/firefox/files/firefox-73.0_fix_lto_pgo_builds.patch
new file mode 100644
index 0000000..5e2420c
--- /dev/null
+++ b/www-client/firefox/files/firefox-73.0_fix_lto_pgo_builds.patch
@@ -0,0 +1,51 @@
+From c193eba68325c07bbf13eb3995842545b7d23695 Mon Sep 17 00:00:00 2001
+From: 
+Date: Thu, 13 Feb 2020 20:29:09 -0600
+Subject: [PATCH] Fix pgo/lto builds
+
+---
+ build/moz.configure/lto-pgo.configure | 4 ++--
+ security/sandbox/linux/moz.build      | 5 ++---
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure
+index 394c1d8911..1f26a6e565 100644
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -70,7 +70,7 @@ set_config('PGO_PROFILE_PATH', pgo_profile_path)
+ def pgo_flags(compiler, target, profdata):
+     if compiler.type == 'gcc':
+         return namespace(
+-            gen_cflags=['-fprofile-generate'],
++            gen_cflags=['-fprofile-generate', '-DMOZ_PROFILE_INSTRUMENTATION'],
+             gen_ldflags=['-fprofile-generate'],
+             use_cflags=['-fprofile-use', '-fprofile-correction',
+                         '-Wcoverage-mismatch'],
+@@ -91,7 +91,7 @@ def pgo_flags(compiler, target, profdata):
+             gen_ldflags = ['-fprofile-generate']
+ 
+         return namespace(
+-            gen_cflags=[prefix + '-fprofile-generate'],
++            gen_cflags=[prefix + '-fprofile-generate', '-DMOZ_PROFILE_INSTRUMENTATION'],
+             gen_ldflags=gen_ldflags,
+             use_cflags=[prefix + '-fprofile-use=%s' % profdata,
+                         # Some error messages about mismatched profile data
+diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
+index aae85843e9..e300260fa0 100644
+--- a/security/sandbox/linux/moz.build
++++ b/security/sandbox/linux/moz.build
+@@ -100,9 +100,8 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+ # gcc lto likes to put the top level asm in syscall.cc in a different partition
+ # from the function using it which breaks the build.  Work around that by
+ # forcing there to be only one partition.
+-for f in CONFIG['OS_CXXFLAGS']:
+-    if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
+-        LDFLAGS += ['--param', 'lto-partitions=1']
++if CONFIG['CC_TYPE'] != 'clang':
++    LDFLAGS += ['--param', 'lto-partitions=1']
+ 
+ DEFINES['NS_NO_XPCOM'] = True
+ DisableStlWrapping()
+-- 
+2.25.0
+

diff --git a/www-client/firefox/firefox-73.0.ebuild b/www-client/firefox/firefox-73.0.ebuild
index a2025c3..c4fb0b2 100644
--- a/www-client/firefox/firefox-73.0.ebuild
+++ b/www-client/firefox/firefox-73.0.ebuild
@@ -257,6 +257,8 @@ src_prepare() {
 	use !wayland && rm -f "${WORKDIR}/firefox/2019_mozilla-bug1539471.patch"
 	eapply "${WORKDIR}/firefox"
 
+	eapply "${FILESDIR}/${PN}-73.0_fix_lto_pgo_builds.patch"
+
 	# Allow user to apply any additional patches without modifing ebuild
 	eapply_user
 


             reply	other threads:[~2020-02-14  2:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  2:34 Jory Pratt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-17 10:56 [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/files/, www-client/firefox/ Joonas Niilola
2020-04-08  2:01 Jory Pratt
2019-09-14 20:35 Jory Pratt
2018-11-04 14:59 Thomas Deutschmann
2018-03-31 14:11 Lars Wendler
2017-06-06  4:39 Jory Pratt
2017-05-12 21:11 Ian Stakenvicius
2017-01-17 17:30 Jory Pratt
2017-01-13 16:38 Jory Pratt
2016-09-22 14:39 Ian Stakenvicius
2016-09-02 13:55 Ian Stakenvicius
2016-08-03 20:48 Ian Stakenvicius
2016-04-05 20:29 Ian Stakenvicius
2016-03-12 19:30 Ian Stakenvicius
2016-02-04 16:39 Ian Stakenvicius
2016-01-15  2:30 Jory Pratt
2015-12-23 21:30 [gentoo-commits] proj/mozilla:crossdev commit in: www-client/firefox/, www-client/firefox/files/ Ian Stakenvicius
2015-12-23 21:06 ` [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/files/, www-client/firefox/ Ian Stakenvicius
2015-10-21 20:41 Ian Stakenvicius
2015-03-01 18:41 Ian Stakenvicius
2014-12-04 21:15 Ian Stakenvicius
2014-10-16 21:18 Ian Stakenvicius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1581647663.49a458e4b89270bb410f8bda5b31713f10e766bf.anarchy@gentoo \
    --to=anarchy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox