From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GFnpT-0006yu-FX for garchives@archives.gentoo.org; Wed, 23 Aug 2006 08:11:15 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k7N899hN009029; Wed, 23 Aug 2006 08:09:09 GMT Received: from cranium.sybase.co.za (sqlprd.sybase.co.za [192.96.139.1]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k7N86uP0006924 for ; Wed, 23 Aug 2006 08:07:04 GMT Received: from localhost (cranium.sybase.co.za [127.0.0.1]) by cranium.sybase.co.za (Postfix) with ESMTP id 9591B83444 for ; Wed, 23 Aug 2006 10:08:22 +0200 (SAST) X-Virus-Scanned: amavisd-new at sybase.co.za Received: from cranium.sybase.co.za ([127.0.0.1]) by localhost (cranium.sybase.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id faK9lVBckwqf for ; Wed, 23 Aug 2006 10:08:15 +0200 (SAST) Received: from [192.168.2.140] (unknown [192.168.2.140]) by cranium.sybase.co.za (Postfix) with ESMTP id 368F183430 for ; Wed, 23 Aug 2006 10:08:05 +0200 (SAST) Subject: Re: [gentoo-user] How to properly change CFLAGS ? From: Alan Mckinnon To: gentoo-user@lists.gentoo.org In-Reply-To: <7573e9640608221140o1fa1d552yd56aa152e00d21db@mail.gmail.com> References: <44EA1CDF.1000304@xunil.at> <1156255958.20980.24.camel@gentoo> <7573e9640608221140o1fa1d552yd56aa152e00d21db@mail.gmail.com> Content-Type: text/plain Date: Wed, 23 Aug 2006 10:07:08 +0200 Message-Id: <1156320428.17199.41.camel@gentoo> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 Content-Transfer-Encoding: 7bit X-Archives-Salt: ba9cd822-56e6-4796-ac0b-52a768ad8f9e X-Archives-Hash: c1a3eef6228101a3f9b4975df4a39632 On Tue, 2006-08-22 at 11:40 -0700, Richard Fish wrote: > On 8/22/06, Alan Mckinnon wrote: > > Your current compiler was built with -O3, and you want to rebuild the > > system using a compiler compiled as -O2, hence the 2 step process. > > *Sigh*. I am so tired of this completely wrong information showing up here. > > 1. It does not matter what -OX flag gcc is compiled with. It has > absolutely *zero* effect on the code that gcc *generates*. > > 2. There is also absolutely no reason to build gcc twice. There is no > such thing as a gcc that was built with the "system compiler", because > gcc uses itself to build itself. It is called a 3-stage bootstrap, > and I suggest you read the gcc documentation first if you want to > debate this point. I have read the docs, several times. I was replying to a confessed newbie so had to keep it simple so he had a chance of understanding the big picture and also not fscking his system. You and I could probably fix that if it happened to us, the OP probably could not. There's more at stake here than just gcc - there's an entire toolchain which very very few people actually understand, including most people on this list. Incidentally, gcc cannot use itself to compile itself - that's nonsensical and a classic bootstrap problem. It uses a binary (which happens to be a gcc) to compile the source code for gcc which produces another binary. That binary then compiles the same source for gcc to produce yet another binary, etc, etc. For stage 1 to work at all, there has to be a compiler available to compile a compiler, and that first compiler that *must* be available is probably the compiler that the rest of the system uses, or the one on the LiveCD. So if you want to be pedantic about building gcc, then please be correctly pedantic and pedantically correct :-) alan -- gentoo-user@gentoo.org mailing list