Gentoo Archives: gentoo-user

From: Mark David Dumlao <madumlao@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How reliable is emerge --info output?
Date: Mon, 14 Jan 2013 12:05:15
Message-Id: CAG2nJkO70K+y3jAUkDHzwQwqG5rOhoVVp9qCpBi1fNdhwgFMzg@mail.gmail.com
In Reply to: [gentoo-user] How reliable is emerge --info output? by Adam Carter
1 On Mon, Jan 14, 2013 at 7:18 PM, Adam Carter <adamcarter3@×××××.com> wrote:
2 > The first CFLAGS (or CXXFLAGS) line below appears to be taken from the
3 > environment setting, and the second is from the "<packagename> was built
4 > with the following" section of the emerge --info output.
5 >
6 > Squid looks as it should (the -flto is added to that package only) but for
7 > firefox it appears that -O2 has been stripped, and not replaced with -O3,
8 > which IIRC is the default for that package.
9 >
10 > # grep ^CFL /etc/make.conf
11 > CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
12 >
13 > # emerge --info squid | grep ^CFL
14 > CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
15 > CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe -flto"
16 >
17 > # emerge --info firefox | grep ^CFL
18 > CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm -O2 -pipe"
19 > CFLAGS="-march=amdfam10 -pipe -mno-avx"
20 >
21 > Is anyone getting O2 or O3 in their emerge --info firefox output?
22 >
23
24 Seems to me like -O2 is the default, according to
25 /usr/portage/eclass/mozcoreconf-2.eclass
26
27 """
28 # Set optimization level
29 if [[ ${ARCH} == hppa ]]; then
30 mozconfig_annotate "more than -O0 causes a segfault on
31 hppa" --enable-optimize=-O0
32 elif [[ ${ARCH} == x86 ]]; then
33 mozconfig_annotate "less then -O2 causes a segfault on
34 x86" --enable-optimize=-O2
35 elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
36 # Set optimization level based on CFLAGS
37 if is-flag -O0; then
38 mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
39 elif [[ ${ARCH} == ppc ]] && has_version
40 '>=sys-libs/glibc-2.8'; then
41 mozconfig_annotate "more than -O1 segfaults on
42 ppc with glibc-2.8" --enable-optimize=-O1
43 elif is-flag -O3; then
44 mozconfig_annotate "from CFLAGS" --enable-optimize=-O3
45 elif is-flag -O1; then
46 mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
47 elif is-flag -Os; then
48 mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
49 else
50 mozconfig_annotate "Gentoo's default
51 optimization" --enable-optimize=-O2
52 fi
53 else
54 # Enable Mozilla's default
55 mozconfig_annotate "mozilla default" --enable-optimize
56 fi
57 """
58
59 --
60 This email is: [ ] actionable [ ] fyi [x] social
61 Response needed: [ ] yes [x] up to you [ ] no
62 Time-sensitive: [ ] immediate [ ] soon [x] none

Replies

Subject Author
Re: [gentoo-user] How reliable is emerge --info output? Adam Carter <adamcarter3@×××××.com>