public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan Mckinnon <alan@linuxholdings.co.za>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to properly change CFLAGS ?
Date: Tue, 22 Aug 2006 16:12:38 +0200	[thread overview]
Message-ID: <1156255958.20980.24.camel@gentoo> (raw)
In-Reply-To: <44EA1CDF.1000304@xunil.at>

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



  parent reply	other threads:[~2006-08-22 12:26 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21 20:51 [gentoo-user] How to properly change CFLAGS ? Stefan G. Weichinger
2006-08-21 21:01 ` Richard Fish
2006-08-21 21:19   ` Stefan G. Weichinger
2006-08-22  3:18     ` Richard Fish
2006-08-22  7:23       ` Stefan G. Weichinger
2006-08-22 15:03       ` Bo Ørsted Andresen
2006-08-22 19:58         ` Stefan G. Weichinger
2006-08-23 21:04       ` Bo Ørsted Andresen
2006-08-23 22:54         ` Richard Fish
2006-08-23 23:31           ` Bo Ørsted Andresen
2006-08-21 21:16 ` Neil Bothwick
2006-08-21 21:27   ` Stefan G. Weichinger
     [not found]     ` <20060822003250.3daebfb0@krikkit.digimed.co.uk>
2006-08-22  2:28       ` Collins Richey
2006-08-22 14:16         ` Bo Ørsted Andresen
2006-08-22  3:06     ` Richard Fish
2006-08-22  7:26       ` Stefan G. Weichinger
     [not found]       ` <1156978378.17760.22.camel@scarlatti.leonora.org>
2006-08-31 11:15         ` Richard Fish
2006-08-22 14:12 ` Alan Mckinnon [this message]
2006-08-22 16:23   ` Dale
2006-08-22 18:36   ` Adrian Frith
2006-08-22 18:54     ` Dale
2006-08-22 19:30     ` Richard Fish
2006-08-22 20:53       ` Bo Ørsted Andresen
2006-08-22 21:02         ` Richard Fish
2006-08-22 21:04           ` Richard Fish
2006-08-22 21:19             ` Bo Ørsted Andresen
2006-08-22 21:50               ` Richard Fish
2006-08-22 21:54                 ` Bo Ørsted Andresen
2006-08-22 21:24             ` Stefan G. Weichinger
2006-08-23  7:43     ` Alan Mckinnon
2006-08-23 11:29       ` Bo Ørsted Andresen
2006-08-23 14:04         ` Alan Mckinnon
2006-08-23 19:40           ` Richard Fish
2006-08-23 19:45             ` Stefan G. Weichinger
2006-08-24  7:06             ` Alan Mckinnon
2006-08-22 18:40   ` Richard Fish
2006-08-23  8:07     ` Alan Mckinnon
2006-08-23 19:06       ` Richard Fish
2006-08-23 20:22         ` Michael Hennebry
2006-08-23 20:29           ` Bo Ørsted Andresen
2006-08-23 20:49             ` Stefan G. Weichinger
2006-08-23 21:48               ` Michael Hennebry
2006-08-23 21:55                 ` Stefan G. Weichinger
2006-08-23 22:21                 ` Bo Ørsted Andresen
2006-08-23 22:24                   ` Bo Ørsted Andresen
2006-08-23 22:50                 ` Richard Fish
2006-08-24 23:31                   ` Michael Hennebry
2006-08-24  7:11         ` Alan Mckinnon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1156255958.20980.24.camel@gentoo \
    --to=alan@linuxholdings.co.za \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox