Gentoo Archives: gentoo-user

From: Alan Mckinnon <alan@××××××××××××××××.za>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to properly change CFLAGS ?
Date: Wed, 23 Aug 2006 07:47:31
Message-Id: 1156319026.17199.27.camel@gentoo
In Reply to: Re: [gentoo-user] How to properly change CFLAGS ? by Adrian Frith
1 On Tue, 2006-08-22 at 20:36 +0200, Adrian Frith wrote:
2 > On Tue, 2006-08-22 at 16:12 +0200, Alan Mckinnon wrote:
3 > > modify CFLAGS in /etc/make.conf
4 > > emerge -e system
5 > > emerge -s world
6 > >
7 > > This will rebuild your toolchain (gcc, glibc and friends) to use -O2
8 > > then rebuild the entire system, including the toolchain again, with -O2.
9 > > Your current compiler was built with -O3, and you want to rebuild the
10 > > system using a compiler compiled as -O2, hence the 2 step process.
11 >
12 > Correct me if I am wrong, but doesn't the gcc ebuild in fact use the
13 > "make bootstrap" method of compiling gcc? - that is:
14 > 1. compile with installed compiler -> stage1
15 > 2. compile with stage1 compiler -> stage2
16 > 3. compile with stage2 compiler -> stage3
17 > 4. compare stage2 and stage3 and install stage3 if they are the same
18 >
19 > If I am right, doesn't it mean that the whole "emerge -e system" step is
20 > pointless? Couldn't one just do "emerge -u gcc" and then "emerge -e
21 > world"? Or am I being stupid?
22
23 I believe the gcc ebuild does do a bootstrap compile, which does imply
24 that emerge -e system is redundant.
25
26 But, we had a huge long rambling thread on this point recently which I'd
27 rather not rehash again :-) and IIRC the general consensus was that
28 'emerge -e system ; emerge -e world' was the way to go, for reasons
29 broader than just gcc. I forget the details, maybe we should both check
30 the archives.
31
32 What I do know is that 'emerge -e system ' is relatively quick compared
33 to 'emerge -e world', so the extra step didn't hurt much when I recently
34 upgraded gcc, it was something like 2 hours for the one, and 36 for the
35 other (!)
36
37 alan
38
39 --
40 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] How to properly change CFLAGS ? "Bo Ørsted Andresen" <bo.andresen@××××.dk>