On Tue, 14 Jun 2016 18:39:54 +1000 Adam Carter wrote:
> You missed another flag: USE="custom-cflags". You should really
> 
> > read USE flag descriptions (/usr/portage/use.{,local.}desc):
> >
> > custom-cflags - Build with user-specified CFLAGS (unsupported)
> > www-client/firefox:custom-optimization - Fine-tune custom compiler
> > optimizations (-Os, -O0, -O1, -O2, -O3)
> >
> > So custom-optimization will only get -O[0123s] option from your
> > CFLAGS,
> 
> 
> That's all I want. However, the -O2 was still filtered even though i have
> custom-optimization on.

Yes, -O* are removed from CFLAGS, because firefox uses
special .mozconfig option for -O* flags:

mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2

emerge --info is not accurate here, as it can't handle non-trivial
stuff like mozconfig.

Actually -O2 is default and if you want only this option, you may
do nothing, since it is enabled by default.

If you have any further doubts, please provide a full build.log
(compress it or place somewhere outside of the list and provide
a link). Though you should see -O2 yourself there:

==========================================================
Building firefox-47.0 with the following configuration
    --enable-application=browser    mozilla.org default
    --enable-optimize=-O2           Gentoo's default optimization

as well as in gcc commands below.

Best regards,
Andrew Savchenko

Attachment: pgpUQoGHe4GN_.pgp
Description: PGP signature

Reply via email to