Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/
Date: Tue, 06 Jun 2017 18:01:33
Message-Id: 1496771561.5df57a6c6ba6b0ac3b13a53a840d0cf038389ec2.anarchy@gentoo
1 commit: 5df57a6c6ba6b0ac3b13a53a840d0cf038389ec2
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 6 17:52:41 2017 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 6 17:52:41 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=5df57a6c
7
8 eclass/mozcoreconf-v5: Force -O2 optimization if gcc-7 or better is used
9
10 eclass/mozcoreconf-v5.eclass | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 diff --git a/eclass/mozcoreconf-v5.eclass b/eclass/mozcoreconf-v5.eclass
14 index 4ecfbd8..9a15798 100644
15 --- a/eclass/mozcoreconf-v5.eclass
16 +++ b/eclass/mozcoreconf-v5.eclass
17 @@ -156,7 +156,9 @@ mozconfig_init() {
18 ####################################
19
20 # Set optimization level
21 - if [[ ${ARCH} == hppa ]]; then
22 + if [[ $(gcc-major-version) -ge 7 ]]; then
23 + mozconfig_annotate "Workaround known breakage" --enable-optimize=-O2
24 + elif [[ ${ARCH} == hppa ]]; then
25 mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0
26 elif [[ ${ARCH} == x86 ]]; then
27 mozconfig_annotate "less then -O2 causes a segfault on x86" --enable-optimize=-O2