* [gentoo-user] How reliable is emerge --info output?
@ 2013-01-14 11:18 Adam Carter
2013-01-14 11:45 ` Bruce Hill
2013-01-14 12:05 ` Mark David Dumlao
0 siblings, 2 replies; 4+ messages in thread
From: Adam Carter @ 2013-01-14 11:18 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
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?
[-- Attachment #2: Type: text/html, Size: 1068 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] How reliable is emerge --info output?
2013-01-14 11:18 [gentoo-user] How reliable is emerge --info output? Adam Carter
@ 2013-01-14 11:45 ` Bruce Hill
2013-01-14 12:05 ` Mark David Dumlao
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Hill @ 2013-01-14 11:45 UTC (permalink / raw
To: gentoo-user
On Mon, Jan 14, 2013 at 10:18:32PM +1100, Adam Carter 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?
mingdao@workstation ~ $ grep ^CFL /etc/portage/make.conf
CFLAGS="-march=native -O2 -pipe"
mingdao@workstation ~ $ emerge --info firefox | grep ^CFL
CFLAGS="-march=native -O2 -pipe"
CFLAGS="-march=native -pipe -mno-avx"
--
Happy Penguin Computers >')
126 Fenco Drive ( \
Tupelo, MS 38801 ^^
support@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/
Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] How reliable is emerge --info output?
2013-01-14 11:18 [gentoo-user] How reliable is emerge --info output? Adam Carter
2013-01-14 11:45 ` Bruce Hill
@ 2013-01-14 12:05 ` Mark David Dumlao
2013-01-14 21:53 ` Adam Carter
1 sibling, 1 reply; 4+ messages in thread
From: Mark David Dumlao @ 2013-01-14 12:05 UTC (permalink / raw
To: gentoo-user
On Mon, Jan 14, 2013 at 7:18 PM, Adam Carter <adamcarter3@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] How reliable is emerge --info output?
2013-01-14 12:05 ` Mark David Dumlao
@ 2013-01-14 21:53 ` Adam Carter
0 siblings, 0 replies; 4+ messages in thread
From: Adam Carter @ 2013-01-14 21:53 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
> # 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
> """
>
And just after that, it appears that if custom-cflags is not set, then it
strips all the -O* flags (if i'm reading the code correctly), which would
explain why there's no -O set for the compiler.....
# Strip optimization so it does not end up in compile string
filter-flags '-O*'
# Strip over-aggressive CFLAGS
use custom-cflags || strip-flags
[-- Attachment #2: Type: text/html, Size: 2322 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-14 21:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 11:18 [gentoo-user] How reliable is emerge --info output? Adam Carter
2013-01-14 11:45 ` Bruce Hill
2013-01-14 12:05 ` Mark David Dumlao
2013-01-14 21:53 ` Adam Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox