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 1GFVKg-0002vl-Gi for garchives@archives.gentoo.org; Tue, 22 Aug 2006 12:26:14 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k7MCMXON019655; Tue, 22 Aug 2006 12:22:33 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 k7MCI0hf001205 for ; Tue, 22 Aug 2006 12:18:05 GMT Received: from localhost (cranium.sybase.co.za [127.0.0.1]) by cranium.sybase.co.za (Postfix) with ESMTP id 6A169834A1 for ; Tue, 22 Aug 2006 14:14:04 +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 yI6mYVPRVGPD for ; Tue, 22 Aug 2006 14:13:56 +0200 (SAST) Received: from [192.168.2.140] (unknown [192.168.2.140]) by cranium.sybase.co.za (Postfix) with ESMTP id ABF2E834A7 for ; Tue, 22 Aug 2006 14:13:33 +0200 (SAST) Subject: Re: [gentoo-user] How to properly change CFLAGS ? From: Alan Mckinnon To: gentoo-user@lists.gentoo.org In-Reply-To: <44EA1CDF.1000304@xunil.at> References: <44EA1CDF.1000304@xunil.at> Content-Type: text/plain Date: Tue, 22 Aug 2006 16:12:38 +0200 Message-Id: <1156255958.20980.24.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: 9a5e3c1f-2ba3-43c3-b79d-fdb86053e579 X-Archives-Hash: 0c7f5a483ca547b51b6c5d24cd3b6c8e On Mon, 2006-08-21 at 22:51 +0200, Stefan G. Weichinger wrote: > I *don't* want to start some flamewar her, I am a newbie in this group, > and I just would like some info on how to do it right, as my extensive > rtfm'ing/googling/etc. has still not given me a satisfying answer. > > I started my Gentoo-installation with CFLAGS containing -O3, believing > to do it right ... > > Now I read about the fact that -O3 results in bigger binaries and isn't > at all guaranteed to give me a faster system. The bigger files result in > more load on IO, so this tells me that it puts the load on the > (relatively slow) 5400 rpm HDD I have in my laptop. OTOH I have "only" > 512 MB RAM in there so it seems interesting to me to go the -O2 way of > doing Gentoo ... -O3 tells gcc to do some wild and wonderful optimizations, none of which are guaranteed to perform well, or even to work at all. They have a use and a place, but are not intended for general use. -O2 is correct for a general purpose machine > Now the question: > > Do I have to do "emerge -e --newuse world" on my system or what else > would be needed? modify CFLAGS in /etc/make.conf emerge -e system emerge -s world This will rebuild your toolchain (gcc, glibc and friends) to use -O2 then rebuild the entire system, including the toolchain again, with -O2. 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. Be warned, this will take a LONG time to complete - consider yourself lucky if you get away with 36 hours if you have all OOo and of KDE or Gnome... So you should only consider doing it if you have specific problems caused by -O3 alan -- gentoo-user@gentoo.org mailing list