On Mon, 2006-05-29 at 21:31 +0200, Meino Christian Cramer wrote:
> From: Matthias Langer <[EMAIL PROTECTED]>
> Subject: Re: [gentoo-user] OpenOffice build failed.
> Date: Mon, 29 May 2006 21:14:25 +0200
> 
> > <snip>
> > >      CFLAGS="-O3 -m3dnow -march=athlon-xp -mtune=athlon64 -msse -msse2 
> > > -msse3 -m3dnow -mfpmath=sse -funroll-loops -fomit-frame-pointer  
> > > -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2"
> > <snip>
> > 
> > Before doing anything else, please clean up your CFLAGS and do 
> > "# emerge -e system; emerge -e world"
> > 
> > If you realy want x86 (with your cpu i would reinstall an amd64 system
> > http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml) then use:
> > 
> > CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer"
> > 
> > because, mostly all of your flags are redundant and the combination
> > "-march=athlon-xp -mtune=athlon64" will give you nothing but maybe
> > broken compiler output.
> > 
> > You may also be interested in these pages:
> > http://gentoo-wiki.com/Safe_Cflags
> > http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Optimize-Options.html#Optimize-Options
> > http://gentoo-wiki.com/CFLAGS
> > http://gentoo-wiki.com/CFLAGS_matrix
> > 
> > HTH,
> > Matthias
> > 
> > 
> > 
> > 
> > -- 
> > gentoo-user@gentoo.org mailing list
> > 
> 
> My decision against 64 bit and pro 32 was done, cause 64 bit gives me
> a performance gain only in some special cirumstances (beside only a
> few others:  when rendering with 64 Bit aware Raytracers) but gives me
> for sure trouble with software, which isn't 64Bit-ready (according to
> different articles of the german c't computer magazine (Heise press).
> 
> When changing CFLAGs on half the way...do I have to recompile my whole
> system? And -- only from the logical point of view -- redundancy may
> be not a sign of cleverness not a sign of cleverness but it does not
> hurt does not hurt the overall context since it instructs the compiler
> twice to do the same?!
> 

Of course, redunant compiler options should not do any harm but:
1.) they are difficult to read for people that may help you.
2.) -O3 turns on a group of compiler switches that are veryfied by
    by the gcc devs to produce good results. The group of these
    switches may change from time to time. Without further invention,
    your custum, today redunant swiches, may break your system 
    tomorrow, after you have choosen to do a compiler upgrade and the
    the actual contents of -O3 have changed. The same applies of course
    to march=athlon-xp. One (harmless) example where this applies is 
    '-fforce-mem'. This option will be completly removed with gcc-4.2,
    does nothing with gcc-4.1, but is activated with '-O3' for
    gcc-3.4.x.

More generally: After doing some experiments, i've decided to use
CFLAGS="-march=athlon-xp -O2 -pipe". I don't think that my system would
be noticeably faster with -O3, as -O3 often gains you nothing.
'-fomit-frame-pointer' may give you a few percent, but it may interfere
with debuging. 

>From the gentoo-x86-handbook:
Mind you that using -fomit-frame-pointer (which doesn't keep the frame
pointer in a register for functions that don't need one) might have
serious repercussions on the debugging of applications!

>From the gcc-manual:
-O also turns on -fomit-frame-pointer on machines where doing so does
not interfere with debugging

Besides, by looking at the terminal while merging packages, you will
soon notice, that lot's of packages add their very own CFLAGS to your
default ones. For example mplayer or xine-lib was compiled with '-O3' on
my system, allthough i have '-O2' in my CFLAGS. (As far as i know, "gcc
-O3 -O2" == "gcc -O3").

> Bad compiler output is another thing.

In this exactly is the reason, i told you to better rebuild your whole
system:
1.) emerge -e system so that all base packages (especially gcc, 
    libtool,  glibc, !python!, ...) are ok.
2.) emerge -e world so that all your packages are rebuild with your 
    fixed toolchain.

If you still problems with openoffice afterwards, it is sure that 
they are not related to your CFLAGS. Only then it makes sense to me to
look at this problem more in detail.

Have a nice day,
Matthias

-- 
gentoo-user@gentoo.org mailing list

Reply via email to