1 |
On Mon, 2006-05-29 at 21:31 +0200, Meino Christian Cramer wrote: |
2 |
> From: Matthias Langer <mlangc@×××.at> |
3 |
> Subject: Re: [gentoo-user] OpenOffice build failed. |
4 |
> Date: Mon, 29 May 2006 21:14:25 +0200 |
5 |
> |
6 |
> > <snip> |
7 |
> > > CFLAGS="-O3 -m3dnow -march=athlon-xp -mtune=athlon64 -msse -msse2 -msse3 -m3dnow -mfpmath=sse -funroll-loops -fomit-frame-pointer -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2" |
8 |
> > <snip> |
9 |
> > |
10 |
> > Before doing anything else, please clean up your CFLAGS and do |
11 |
> > "# emerge -e system; emerge -e world" |
12 |
> > |
13 |
> > If you realy want x86 (with your cpu i would reinstall an amd64 system |
14 |
> > http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml) then use: |
15 |
> > |
16 |
> > CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer" |
17 |
> > |
18 |
> > because, mostly all of your flags are redundant and the combination |
19 |
> > "-march=athlon-xp -mtune=athlon64" will give you nothing but maybe |
20 |
> > broken compiler output. |
21 |
> > |
22 |
> > You may also be interested in these pages: |
23 |
> > http://gentoo-wiki.com/Safe_Cflags |
24 |
> > http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Optimize-Options.html#Optimize-Options |
25 |
> > http://gentoo-wiki.com/CFLAGS |
26 |
> > http://gentoo-wiki.com/CFLAGS_matrix |
27 |
> > |
28 |
> > HTH, |
29 |
> > Matthias |
30 |
> > |
31 |
> > |
32 |
> > |
33 |
> > |
34 |
> > -- |
35 |
> > gentoo-user@g.o mailing list |
36 |
> > |
37 |
> |
38 |
> My decision against 64 bit and pro 32 was done, cause 64 bit gives me |
39 |
> a performance gain only in some special cirumstances (beside only a |
40 |
> few others: when rendering with 64 Bit aware Raytracers) but gives me |
41 |
> for sure trouble with software, which isn't 64Bit-ready (according to |
42 |
> different articles of the german c't computer magazine (Heise press). |
43 |
> |
44 |
> When changing CFLAGs on half the way...do I have to recompile my whole |
45 |
> system? And -- only from the logical point of view -- redundancy may |
46 |
> be not a sign of cleverness not a sign of cleverness but it does not |
47 |
> hurt does not hurt the overall context since it instructs the compiler |
48 |
> twice to do the same?! |
49 |
> |
50 |
|
51 |
Of course, redunant compiler options should not do any harm but: |
52 |
1.) they are difficult to read for people that may help you. |
53 |
2.) -O3 turns on a group of compiler switches that are veryfied by |
54 |
by the gcc devs to produce good results. The group of these |
55 |
switches may change from time to time. Without further invention, |
56 |
your custum, today redunant swiches, may break your system |
57 |
tomorrow, after you have choosen to do a compiler upgrade and the |
58 |
the actual contents of -O3 have changed. The same applies of course |
59 |
to march=athlon-xp. One (harmless) example where this applies is |
60 |
'-fforce-mem'. This option will be completly removed with gcc-4.2, |
61 |
does nothing with gcc-4.1, but is activated with '-O3' for |
62 |
gcc-3.4.x. |
63 |
|
64 |
More generally: After doing some experiments, i've decided to use |
65 |
CFLAGS="-march=athlon-xp -O2 -pipe". I don't think that my system would |
66 |
be noticeably faster with -O3, as -O3 often gains you nothing. |
67 |
'-fomit-frame-pointer' may give you a few percent, but it may interfere |
68 |
with debuging. |
69 |
|
70 |
>From the gentoo-x86-handbook: |
71 |
Mind you that using -fomit-frame-pointer (which doesn't keep the frame |
72 |
pointer in a register for functions that don't need one) might have |
73 |
serious repercussions on the debugging of applications! |
74 |
|
75 |
>From the gcc-manual: |
76 |
-O also turns on -fomit-frame-pointer on machines where doing so does |
77 |
not interfere with debugging |
78 |
|
79 |
Besides, by looking at the terminal while merging packages, you will |
80 |
soon notice, that lot's of packages add their very own CFLAGS to your |
81 |
default ones. For example mplayer or xine-lib was compiled with '-O3' on |
82 |
my system, allthough i have '-O2' in my CFLAGS. (As far as i know, "gcc |
83 |
-O3 -O2" == "gcc -O3"). |
84 |
|
85 |
> Bad compiler output is another thing. |
86 |
|
87 |
In this exactly is the reason, i told you to better rebuild your whole |
88 |
system: |
89 |
1.) emerge -e system so that all base packages (especially gcc, |
90 |
libtool, glibc, !python!, ...) are ok. |
91 |
2.) emerge -e world so that all your packages are rebuild with your |
92 |
fixed toolchain. |
93 |
|
94 |
If you still problems with openoffice afterwards, it is sure that |
95 |
they are not related to your CFLAGS. Only then it makes sense to me to |
96 |
look at this problem more in detail. |
97 |
|
98 |
Have a nice day, |
99 |
Matthias |
100 |
|
101 |
-- |
102 |
gentoo-user@g.o mailing list |