Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-31 Thread Richard Fish
On 8/30/06, Vladimir G. Ivanovic [EMAIL PROTECTED] wrote: On Mon, 2006-08-21 at 20:06 -0700, Richard Fish wrote: -Os seems to take much less time and memory to compile than -O2 or -O3. And being a ~arch user, time-to-compile is a nice thing to reduce. It is possible that one of my usual

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-24 Thread Alan Mckinnon
On Wed, 2006-08-23 at 12:40 -0700, Richard Fish wrote: On 8/23/06, Alan Mckinnon [EMAIL PROTECTED] wrote: Can you be absolutely certain I'm wrong? Can you absolutely guarantee that a recompile with a different config MUST be treated differently to an upgrade? We are still talking about

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-24 Thread Alan Mckinnon
On Wed, 2006-08-23 at 12:06 -0700, Richard Fish wrote: More seriously, there is some really _stupid_ information about upgrading gcc on the gentoo-wiki and forums that seems to crop up here every few months, and it makes me really, really angry. Stupid crap like needing to emerge -e system ;

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-24 Thread Michael Hennebry
On Wed, 23 Aug 2006, Richard Fish wrote: What would break with -Os that wouldn't break with -O2? I was under the impression that both flags only allowed changes that didn't affect the output. No, the output *is* allowed to change based on -Os, -O2, or -O3. This is the entire point of

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Alan Mckinnon
On Tue, 2006-08-22 at 20:36 +0200, Adrian Frith wrote: On Tue, 2006-08-22 at 16:12 +0200, Alan Mckinnon wrote: 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,

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Alan Mckinnon
On Tue, 2006-08-22 at 11:40 -0700, Richard Fish wrote: On 8/22/06, Alan Mckinnon [EMAIL PROTECTED] 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

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Bo Ørsted Andresen
On Wednesday 23 August 2006 09:43, Alan Mckinnon wrote: I believe the gcc ebuild does do a bootstrap compile, which does imply that emerge -e system is redundant. But, we had a huge long rambling thread on this point recently which I'd rather not rehash again :-) and IIRC the general

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Alan Mckinnon
On Wed, 2006-08-23 at 13:29 +0200, Bo Ørsted Andresen wrote: On Wednesday 23 August 2006 09:43, Alan Mckinnon wrote: I believe the gcc ebuild does do a bootstrap compile, which does imply that emerge -e system is redundant. But, we had a huge long rambling thread on this point recently

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Richard Fish
On 8/23/06, Alan Mckinnon [EMAIL PROTECTED] wrote: 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

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Richard Fish
On 8/23/06, Alan Mckinnon [EMAIL PROTECTED] wrote: Can you be absolutely certain I'm wrong? Can you absolutely guarantee that a recompile with a different config MUST be treated differently to an upgrade? We are still talking about CFLAGS here, right? Then ok, no, it is not _necessary_ to

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Stefan G. Weichinger
Richard Fish wrote: Gcc is (almost) always built with -O2 on Gentoo, but it does not matter anyway. The CFLAGS that gcc is built with does not effect the binaries it generates...only the code and the flags passed to gcc during the compilation effect this. If your model were correct, you

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Michael Hennebry
On Wed, 23 Aug 2006, Richard Fish wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 or nothing, because all other -O options are replaced with -O2 by toolchain.eclass. Since the OP wanted -Os, the question remains: How, if at all, can he get -Os ? -- Mike [EMAIL

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Bo Ørsted Andresen
On Wednesday 23 August 2006 22:22, Michael Hennebry wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 or nothing, because all other -O options are replaced with -O2 by toolchain.eclass. Since the OP wanted -Os, the question remains: How, if at all, can he get -Os

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Stefan G. Weichinger
Bo Ørsted Andresen wrote: On Wednesday 23 August 2006 22:22, Michael Hennebry wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 or nothing, because all other -O options are replaced with -O2 by toolchain.eclass. Since the OP wanted -Os, the question remains: How, if

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Bo Ørsted Andresen
On Tuesday 22 August 2006 05:18, Richard Fish wrote: Actually there is.  You can find all packages not compiled with -Os and rebuild them with something like: cd /var/db/pkg for pkg in */* ; do     grep -v -- -Os $pkg/CFLAGS /dev/null     test $? -eq 0 emerge --oneshot =$pkg done

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Michael Hennebry
On Wed, 23 Aug 2006, Stefan G. Weichinger wrote: Bo Ørsted Andresen wrote: On Wednesday 23 August 2006 22:22, Michael Hennebry wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 or nothing, because all other -O options are replaced with -O2 by toolchain.eclass.

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Stefan G. Weichinger
Michael Hennebry wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 or nothing, because all other -O options are replaced with -O2 by toolchain.eclass. Perhaps I misunderstood the preceeding. I'd taken it to mean that recompiling any package with gentoo tools

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Bo Ørsted Andresen
On Wednesday 23 August 2006 23:48, Michael Hennebry wrote: Oh, and BTW, on gentoo your optimization choices for gcc are -O, -O2 note 'choices for gcc' above ^ or nothing, because all other -O options are replaced with -O2 by toolchain.eclass.

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-23 Thread Bo Ørsted Andresen
On Thursday 24 August 2006 00:21, Bo Ørsted Andresen wrote: will either have to look at the ebuilds and any eclasses that they append s/append/inherit/ -- Bo Andresen pgpJ5logQmBhQ.pgp Description: PGP signature

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Stefan G. Weichinger
Richard Fish schrieb: On 8/21/06, Stefan G. Weichinger [EMAIL PROTECTED] wrote: Richard Fish schrieb: or emerge -e world to complete. I would be tempted to just change the flags and hold off on recompiling everything until the next version of gcc comes out. ( ... next version in terms

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Stefan G. Weichinger
Richard Fish schrieb: On 8/21/06, Stefan G. Weichinger [EMAIL PROTECTED] wrote: Acer TM 634 P4-M 1.8GHz (cpu family : 15, model : 2) 512 MB RAM 30 GB 5200 rpm HDD It's all relative. I have a 2.1Ghz Core Duo with 2G of RAM and a 160Gb HD, so *I* would consider your laptop, um,

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Alan Mckinnon
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

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Bo Ørsted Andresen
On Tuesday 22 August 2006 05:18, Richard Fish wrote: I see the point in this. (AFAIK there is no way to break up emerge -e xy into smaller pieces, something to do in several separated steps. Actually there is.  You can find all packages not compiled with -Os and rebuild them with something

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Dale
Alan Mckinnon wrote: 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 Why is he searching for a package with world in it? I think you meant to put emerge -e

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Richard Fish
On 8/22/06, Alan Mckinnon [EMAIL PROTECTED] 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

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Dale
Adrian Frith wrote: On Tue, 2006-08-22 at 16:12 +0200, Alan Mckinnon wrote: 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.

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Stefan G. Weichinger
Bo Ørsted Andresen wrote: On Tuesday 22 August 2006 05:18, Richard Fish wrote: I see the point in this. (AFAIK there is no way to break up emerge -e xy into smaller pieces, something to do in several separated steps. Actually there is. You can find all packages not compiled with -Os and

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Bo Ørsted Andresen
On Tuesday 22 August 2006 21:30, Richard Fish wrote: revdep-rebuild --library=libstdc++.so.6 emerge --prune gcc emerge -e world Am I correct that the revdep-rebuild step is redundant if you don't need any C++ apps for the next 48 hours (assuming the emerge -e world completes successfully)?

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Richard Fish
On 8/22/06, Richard Fish [EMAIL PROTECTED] wrote: On 8/22/06, Bo Ørsted Andresen [EMAIL PROTECTED] wrote: Am I correct that the revdep-rebuild step is redundant if you don't need any C++ apps for the next 48 hours (assuming the emerge -e world completes successfully)? Yep. Oh, except that

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Bo Ørsted Andresen
On Tuesday 22 August 2006 23:04, Richard Fish wrote: On 8/22/06, Richard Fish [EMAIL PROTECTED] wrote: On 8/22/06, Bo Ørsted Andresen [EMAIL PROTECTED] wrote: Am I correct that the revdep-rebuild step is redundant if you don't need any C++ apps for the next 48 hours (assuming the emerge

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Stefan G. Weichinger
Richard Fish wrote: On 8/22/06, Richard Fish [EMAIL PROTECTED] wrote: On 8/22/06, Bo Ørsted Andresen [EMAIL PROTECTED] wrote: Am I correct that the revdep-rebuild step is redundant if you don't need any C++ apps for the next 48 hours (assuming the emerge -e world completes successfully)?

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Richard Fish
On 8/22/06, Bo Ørsted Andresen [EMAIL PROTECTED] wrote: Now I'm confused.. ;) Would pruning the old gcc before running emerge -e world break anything that's isn't a C++ app? Well, technically, no. But considering that some python modules are implemented in C++ and link against libstdc++

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-22 Thread Bo Ørsted Andresen
On Tuesday 22 August 2006 23:50, Richard Fish wrote: Now I'm confused.. ;) Would pruning the old gcc before running emerge -e world break anything that's isn't a C++ app? Well, technically, no.  But considering that some python modules are implemented in C++ and link against libstdc++

[gentoo-user] How to properly change CFLAGS ?

2006-08-21 Thread Stefan G. Weichinger
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

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-21 Thread Neil Bothwick
On Mon, 21 Aug 2006 22:51:43 +0200, Stefan G. Weichinger wrote: 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)

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-21 Thread Collins Richey
On 8/21/06, Neil Bothwick [EMAIL PROTECTED] wrote: On Mon, 21 Aug 2006 23:27:14 +0200, Stefan G. Weichinger wrote: So it is not *that* constrained in terms of RAM and disk, I assume. But I am also ready to go the -Os-way if you recommend/suggest it for my system. Many laptops have

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-21 Thread Richard Fish
On 8/21/06, Stefan G. Weichinger [EMAIL PROTECTED] wrote: Acer TM 634 P4-M 1.8GHz (cpu family : 15, model : 2) 512 MB RAM 30 GB 5200 rpm HDD It's all relative. I have a 2.1Ghz Core Duo with 2G of RAM and a 160Gb HD, so *I* would consider your laptop, um, underpowered. :-) But I also run

Re: [gentoo-user] How to properly change CFLAGS ?

2006-08-21 Thread Richard Fish
On 8/21/06, Stefan G. Weichinger [EMAIL PROTECTED] wrote: Richard Fish schrieb: or emerge -e world to complete. I would be tempted to just change the flags and hold off on recompiling everything until the next version of gcc comes out. ( ... next version in terms of minor- or