Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/files/, www-client/firefox/
Date: Sat, 14 Sep 2019 20:35:07
Message-Id: 1568131607.4694c68a6b60520d02af98fc1fced6dfc642ee93.anarchy@gentoo
1 commit: 4694c68a6b60520d02af98fc1fced6dfc642ee93
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 10 16:06:47 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 10 16:06:47 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=4694c68a
7
8 www-client/firefox: fix lto builds
9
10 Closes: https://bugs.gentoo.org/689358
11 Closes: https://bugs.gentoo.org/693654
12 Package-Manager: Portage-2.3.75, Repoman-2.3.17
13 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
14
15 .../firefox/files/firefox-69.0-lto-gcc-fix.patch | 26 ++++++++++++++++++++++
16 ...{firefox-69.0.ebuild => firefox-69.0-r1.ebuild} | 6 ++---
17 2 files changed, 28 insertions(+), 4 deletions(-)
18
19 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
20 new file mode 100644
21 index 0000000..9fe9673
22 --- /dev/null
23 +++ b/www-client/firefox/files/firefox-69.0-lto-gcc-fix.patch
24 @@ -0,0 +1,26 @@
25 +# HG changeset patch
26 +# Parent 79ae951dc72ba16a2451c4cde7298aa986376b0c
27 +Fix lto builds of sandbox on linux
28 +
29 +diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
30 +--- a/security/sandbox/linux/moz.build
31 ++++ b/security/sandbox/linux/moz.build
32 +@@ -95,17 +95,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
33 + CXXFLAGS += ['-Wno-shadow']
34 + SOURCES['../chromium/sandbox/linux/services/syscall_wrappers.cc'].flags += [
35 + '-Wno-empty-body',
36 + ]
37 +
38 + # gcc lto likes to put the top level asm in syscall.cc in a different partition
39 + # from the function using it which breaks the build. Work around that by
40 + # forcing there to be only one partition.
41 +-for f in CONFIG['OS_CXXFLAGS']:
42 ++for f in CONFIG['MOZ_LTO_CFLAGS']:
43 + if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
44 + LDFLAGS += ['--param', 'lto-partitions=1']
45 +
46 + DEFINES['NS_NO_XPCOM'] = True
47 + DisableStlWrapping()
48 +
49 + LOCAL_INCLUDES += ['/security/sandbox/linux']
50 + LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
51
52 diff --git a/www-client/firefox/firefox-69.0.ebuild b/www-client/firefox/firefox-69.0-r1.ebuild
53 similarity index 99%
54 rename from www-client/firefox/firefox-69.0.ebuild
55 rename to www-client/firefox/firefox-69.0-r1.ebuild
56 index 8e13dc4..4e89b4f 100644
57 --- a/www-client/firefox/firefox-69.0.ebuild
58 +++ b/www-client/firefox/firefox-69.0-r1.ebuild
59 @@ -257,6 +257,7 @@ src_unpack() {
60 src_prepare() {
61 use !wayland && rm -f "${WORKDIR}/firefox/2019_mozilla-bug1539471.patch"
62 eapply "${WORKDIR}/firefox"
63 + eapply "${FILESDIR}${PN}-69.0-lto-gcc-fix.patch"
64
65 # Allow user to apply any additional patches without modifing ebuild
66 eapply_user
67 @@ -384,9 +385,6 @@ src_configure() {
68 show_old_compiler_warning=1
69 fi
70
71 - # Bug 689358
72 - append-cxxflags -flto
73 -
74 if ! use cpu_flags_x86_avx2 ; then
75 local _gcc_version_with_ipa_cdtor_fix="8.3"
76 local _current_gcc_version="$(gcc-major-version).$(gcc-minor-version)"
77 @@ -431,7 +429,7 @@ src_configure() {
78 if use clang ; then
79 # This is upstream's default
80 mozconfig_annotate "forcing ld=lld due to USE=clang" --enable-linker=lld
81 - elif tc-ld-is-gold ; then
82 + elif tc-ld-is-gold || use lto ; then
83 mozconfig_annotate "linker is set to gold" --enable-linker=gold
84 else
85 mozconfig_annotate "linker is set to bfd" --enable-linker=bfd