Gentoo Archives: gentoo-user

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to try custom-optimization in firefox
Date: Tue, 14 Jun 2016 09:33:29
Message-Id: 20160614123311.ea7f66ad13dac2e0b6a8babd@gentoo.org
In Reply to: Re: [gentoo-user] How to try custom-optimization in firefox by Adam Carter
1 On Tue, 14 Jun 2016 18:39:54 +1000 Adam Carter wrote:
2 > You missed another flag: USE="custom-cflags". You should really
3 >
4 > > read USE flag descriptions (/usr/portage/use.{,local.}desc):
5 > >
6 > > custom-cflags - Build with user-specified CFLAGS (unsupported)
7 > > www-client/firefox:custom-optimization - Fine-tune custom compiler
8 > > optimizations (-Os, -O0, -O1, -O2, -O3)
9 > >
10 > > So custom-optimization will only get -O[0123s] option from your
11 > > CFLAGS,
12 >
13 >
14 > That's all I want. However, the -O2 was still filtered even though i have
15 > custom-optimization on.
16
17 Yes, -O* are removed from CFLAGS, because firefox uses
18 special .mozconfig option for -O* flags:
19
20 mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2
21
22 emerge --info is not accurate here, as it can't handle non-trivial
23 stuff like mozconfig.
24
25 Actually -O2 is default and if you want only this option, you may
26 do nothing, since it is enabled by default.
27
28 If you have any further doubts, please provide a full build.log
29 (compress it or place somewhere outside of the list and provide
30 a link). Though you should see -O2 yourself there:
31
32 ==========================================================
33 Building firefox-47.0 with the following configuration
34 --enable-application=browser mozilla.org default
35 --enable-optimize=-O2 Gentoo's default optimization
36
37 as well as in gcc commands below.
38
39 Best regards,
40 Andrew Savchenko