1 |
On Mon, 2006-08-21 at 22:51 +0200, Stefan G. Weichinger wrote: |
2 |
> I *don't* want to start some flamewar her, I am a newbie in this group, |
3 |
> and I just would like some info on how to do it right, as my extensive |
4 |
> rtfm'ing/googling/etc. has still not given me a satisfying answer. |
5 |
> |
6 |
> I started my Gentoo-installation with CFLAGS containing -O3, believing |
7 |
> to do it right ... |
8 |
> |
9 |
> Now I read about the fact that -O3 results in bigger binaries and isn't |
10 |
> at all guaranteed to give me a faster system. The bigger files result in |
11 |
> more load on IO, so this tells me that it puts the load on the |
12 |
> (relatively slow) 5400 rpm HDD I have in my laptop. OTOH I have "only" |
13 |
> 512 MB RAM in there so it seems interesting to me to go the -O2 way of |
14 |
> doing Gentoo ... |
15 |
|
16 |
-O3 tells gcc to do some wild and wonderful optimizations, none of which |
17 |
are guaranteed to perform well, or even to work at all. They have a use |
18 |
and a place, but are not intended for general use. |
19 |
|
20 |
-O2 is correct for a general purpose machine |
21 |
|
22 |
> Now the question: |
23 |
> |
24 |
> Do I have to do "emerge -e --newuse world" on my system or what else |
25 |
> would be needed? |
26 |
|
27 |
modify CFLAGS in /etc/make.conf |
28 |
emerge -e system |
29 |
emerge -s world |
30 |
|
31 |
This will rebuild your toolchain (gcc, glibc and friends) to use -O2 |
32 |
then rebuild the entire system, including the toolchain again, with -O2. |
33 |
Your current compiler was built with -O3, and you want to rebuild the |
34 |
system using a compiler compiled as -O2, hence the 2 step process. |
35 |
|
36 |
Be warned, this will take a LONG time to complete - consider yourself |
37 |
lucky if you get away with 36 hours if you have all OOo and of KDE or |
38 |
Gnome... So you should only consider doing it if you have specific |
39 |
problems caused by -O3 |
40 |
|
41 |
|
42 |
alan |
43 |
|
44 |
|
45 |
-- |
46 |
gentoo-user@g.o mailing list |