On Mon, Jan 14, 2013 at 7:18 PM, Adam Carter <[email protected]> wrote:
> The first CFLAGS (or CXXFLAGS) line below appears to be taken from the
> environment setting, and the second is from the "<packagename> was built
> with the following" section of the emerge --info output.
>
> Squid looks as it should (the -flto is added to that package only) but for
> firefox it appears that -O2 has been stripped, and not replaced with -O3,
> which IIRC is the default for that package.
>
> # grep ^CFL /etc/make.conf
> CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
>
> # emerge --info squid | grep ^CFL
> CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
> CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe -flto"
>
> # emerge --info firefox | grep ^CFL
> CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
> CFLAGS="-march=amdfam10 -pipe -mno-avx"
>
> Is anyone getting O2 or O3 in their emerge --info firefox output?
>

Seems to me like -O2 is the default, according to
/usr/portage/eclass/mozcoreconf-2.eclass

"""
 # Set optimization level
        if [[ ${ARCH} == hppa ]]; then
                mozconfig_annotate "more than -O0 causes a segfault on
hppa" --enable-optimize=-O0
        elif [[ ${ARCH} == x86 ]]; then
                mozconfig_annotate "less then -O2 causes a segfault on
x86" --enable-optimize=-O2
        elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
                # Set optimization level based on CFLAGS
                if is-flag -O0; then
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
                elif [[ ${ARCH} == ppc ]] && has_version
'>=sys-libs/glibc-2.8'; then
                        mozconfig_annotate "more than -O1 segfaults on
ppc with glibc-2.8" --enable-optimize=-O1
                elif is-flag -O3; then
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-O3
                elif is-flag -O1; then
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
                elif is-flag -Os; then
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
                else
                        mozconfig_annotate "Gentoo's default
optimization" --enable-optimize=-O2
                fi
        else
                # Enable Mozilla's default
                mozconfig_annotate "mozilla default" --enable-optimize
        fi
"""

--
This email is:    [ ] actionable   [ ] fyi        [x] social
Response needed:  [ ] yes          [x] up to you  [ ] no
Time-sensitive:   [ ] immediate    [ ] soon       [x] none

Reply via email to