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 08:11:15
Message-Id: 1156320428.17199.41.camel@gentoo
In Reply to: Re: [gentoo-user] How to properly change CFLAGS ? by Richard Fish
1 On Tue, 2006-08-22 at 11:40 -0700, Richard Fish wrote:
2 > On 8/22/06, Alan Mckinnon <alan@××××××××××××××××.za> wrote:
3 > > Your current compiler was built with -O3, and you want to rebuild the
4 > > system using a compiler compiled as -O2, hence the 2 step process.
5 >
6 > *Sigh*. I am so tired of this completely wrong information showing up here.
7 >
8 > 1. It does not matter what -OX flag gcc is compiled with. It has
9 > absolutely *zero* effect on the code that gcc *generates*.
10 >
11 > 2. There is also absolutely no reason to build gcc twice. There is no
12 > such thing as a gcc that was built with the "system compiler", because
13 > gcc uses itself to build itself. It is called a 3-stage bootstrap,
14 > and I suggest you read the gcc documentation first if you want to
15 > debate this point.
16
17 I have read the docs, several times. I was replying to a confessed
18 newbie so had to keep it simple so he had a chance of understanding the
19 big picture and also not fscking his system. You and I could probably
20 fix that if it happened to us, the OP probably could not. There's more
21 at stake here than just gcc - there's an entire toolchain which very
22 very few people actually understand, including most people on this list.
23
24 Incidentally, gcc cannot use itself to compile itself - that's
25 nonsensical and a classic bootstrap problem. It uses a binary (which
26 happens to be a gcc) to compile the source code for gcc which produces
27 another binary. That binary then compiles the same source for gcc to
28 produce yet another binary, etc, etc. For stage 1 to work at all, there
29 has to be a compiler available to compile a compiler, and that first
30 compiler that *must* be available is probably the compiler that the rest
31 of the system uses, or the one on the LiveCD. So if you want to be
32 pedantic about building gcc, then please be correctly pedantic and
33 pedantically correct :-)
34
35 alan
36
37
38 --
39 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] How to properly change CFLAGS ? Richard Fish <bigfish@××××××××××.org>