Re: [gentoo-user] How to try custom-optimization in firefox

2016-06-14 Thread Andrew Savchenko
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=browsermozilla.org default
--enable-optimize=-O2   Gentoo's default optimization

as well as in gcc commands below.

Best regards,
Andrew Savchenko


pgpUQoGHe4GN_.pgp
Description: PGP signature


Re: [gentoo-user] How to try custom-optimization in firefox

2016-06-14 Thread Adam Carter
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.
emerge --info output;

=
Package Settings
=

www-client/firefox-47.0::gentoo was built with the following:
USE="*custom-optimization* dbus gmp-autoupdate gtk2 hwaccel jemalloc3 jit
pulseaudio -bindist -custom-cflags -debug -hardened (-neon) (-pgo)
(-selinux) -startup-notification (-system-cairo) -system-harfbuzz
-system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite
-test -wifi" ABI_X86="64" LINGUAS="-ach -af -an -ar -as -ast -az -be -bg
-bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_ZA -eo -es_AR
-es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he
-hi_IN -hr -hsb -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk
-ml -mr -ms -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si
-sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -uz -vi -xh -zh_CN -zh_TW"
CFLAGS=*"-march=amdfam10 -pipe"*
CXXFLAGS="-march=amdfam10 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=amdfam10 -pipe
-Wl,-rpath=/usr/lib64/firefox"


Re: [gentoo-user] How to try custom-optimization in firefox

2016-06-13 Thread Andrew Savchenko
On Tue, 14 Jun 2016 14:55:08 +1000 Adam Carter wrote:
> I have enabled this use flag and the output of emerge --info shows it has
> been recognised in USE but not in FCFLAGs/CFLAGs;
> 
> grep USE.*custom ff*
> ffafter-cust-opt.txt:USE="custom-optimization dbus gmp-autoupdate gtk2
> hwaccel jemalloc3 jit pulseaudio -bindist -custom-cflags -debug -hardened
> (-neon) (-pgo) (-selinux) -startup-notification (-system-cairo)
> -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx
> -system-sqlite -test -wifi"
> ffbefore-cust-opt.txt:USE="dbus gmp-autoupdate gtk2 hwaccel jemalloc3 jit
> pulseaudio -bindist -custom-cflags -custom-optimization -debug -hardened
> (-neon) (-pgo) (-selinux) -startup-notification (-system-cairo)
> -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx
> -system-sqlite -test -wifi"
> 
> grep CFLAGS ff*
> ffafter-cust-opt.txt:CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm
> -O2 -pipe"
> ffafter-cust-opt.txt:FCFLAGS="-O2 -pipe"
> ffafter-cust-opt.txt:CFLAGS="-march=amdfam10 -pipe"
> ffbefore-cust-opt.txt:CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm
> -O2 -pipe"
> ffbefore-cust-opt.txt:FCFLAGS="-O2 -pipe"
> ffbefore-cust-opt.txt:CFLAGS="-march=amdfam10 -pipe"
> 
> I assumed that enabling custom-optimization would let the optimization
> setting from CFLAGS in make.conf pass through unfiltered, but that's not
> the case. What else do i need to do to make it work?

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, if you need another options, use custom-cflags. If you need
both (-O* and other options), set both USE flags (as can be seen
from mozcoreconf-v4.eclass).

Best regards,
Andrew Savchenko


pgpUZ666RMISS.pgp
Description: PGP signature