[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] CFLAGS and USE Question



Wonkey Donkey wrote:

Im doing some compiling on my laptop, which is a P4M 2.4 processor.

I've found stacks of recommendations on various sites for the CFLAGS
setting, which is all beginning to get rather confusing.

What I've come up with now is:

-march=pentium4 -O2 -fomit-frame-pointer -mmmx -msse -mfpmath=sse

Is there anybody who knows enough about it to see if the above is reasonable
or even good for the CPU I have ?

That looks quite reasonable to me. I don't have a P4 (went for AMD64), but -O2 seems to be the best all round option for most applications etc. I think -march=pentium4 turns on '-mmmx -msse -mfpmath=sse' (at least the first two) but it won't hurt for you to put it in too as far as I am aware.

-fomit-frame-pointer seems to work well for most people, although it does make debugging virtually impossible. This isn't usually a problem unless you are trying to report bugs on a particular application.

Is there anything you would add to, or remove from, the line above ?

The first one I tried is:

-march=pentium4 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-function
s=4 -mmmx -msse -msse2 -mfpmath=sse -fprefetch-loop-arrays

But this seemed to barf a lot of the time.

Those flags are very aggressive, and many seem to believe -O3 does little or nothing to improve speed (in some cases it seems to make it worse) and it increases both executable size and compile time significantly.

The USE setting is currently :

acpi alsa avi cdr cups dvd encoder gnome gphoto2 gpm gtk gtk2 java jpeg kde
mmx mozilla mpeg png qt sse ssl tcltk tetex truetype usb X xosd xml xml2
xmms xv zlib x86

I *think* this one is quite reasonable, as I want to build it up to a fully
featured system with a good all round spread of applications.

That looks reasonable to me.

Any help much appreciated!

(This is for a new Gentoo install BTW).

You should be OK with what you have selected. I have an AMD64 install with similar CFLAGS (although 64 bit compiled and a 32 bit chroot) and it works fine. Also had a PIII with very similar that worked great until it stopped posting :(

Give it a try - you should be fine. There is lots of help available on the Gentoo forums and mailing lists too if you need it. They are a great source of help and information.
___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

GNU the choice of a complete generation.