Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] How reliable is emerge --info output?
Date: Mon, 14 Jan 2013 21:53:42
Message-Id: CAC=wYCHOnLJA9k8P4QWVL5JDbHxvmoz-3-rWS6Bim54FH02B2w@mail.gmail.com
In Reply to: Re: [gentoo-user] How reliable is emerge --info output? by Mark David Dumlao
1 > # Set optimization level
2 > if [[ ${ARCH} == hppa ]]; then
3 > mozconfig_annotate "more than -O0 causes a segfault on
4 > hppa" --enable-optimize=-O0
5 > elif [[ ${ARCH} == x86 ]]; then
6 > mozconfig_annotate "less then -O2 causes a segfault on
7 > x86" --enable-optimize=-O2
8 > elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
9 > # Set optimization level based on CFLAGS
10 > if is-flag -O0; then
11 > mozconfig_annotate "from CFLAGS"
12 > --enable-optimize=-O0
13 > elif [[ ${ARCH} == ppc ]] && has_version
14 > '>=sys-libs/glibc-2.8'; then
15 > mozconfig_annotate "more than -O1 segfaults on
16 > ppc with glibc-2.8" --enable-optimize=-O1
17 > elif is-flag -O3; then
18 > mozconfig_annotate "from CFLAGS"
19 > --enable-optimize=-O3
20 > elif is-flag -O1; then
21 > mozconfig_annotate "from CFLAGS"
22 > --enable-optimize=-O1
23 > elif is-flag -Os; then
24 > mozconfig_annotate "from CFLAGS"
25 > --enable-optimize=-Os
26 > else
27 > mozconfig_annotate "Gentoo's default
28 > optimization" --enable-optimize=-O2
29 > fi
30 > else
31 > # Enable Mozilla's default
32 > mozconfig_annotate "mozilla default" --enable-optimize
33 > fi
34 > """
35 >
36
37 And just after that, it appears that if custom-cflags is not set, then it
38 strips all the -O* flags (if i'm reading the code correctly), which would
39 explain why there's no -O set for the compiler.....
40
41 # Strip optimization so it does not end up in compile string
42 filter-flags '-O*'
43
44 # Strip over-aggressive CFLAGS
45 use custom-cflags || strip-flags