Re: [proaudio] gcc cflags

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


On Mon, 21 Aug 2006 19:08:53 +0200
Thomas Kuther <gimpel@xxxxxxxxxxxxxxxx> wrote:

> On Mon, 21 Aug 2006 11:15:49 +0200
> Dominique Michel <dominique.michel@xxxxxxxxxxxx> wrote:
> 
> > I want soon upgrade to gcc 4, but I want to hear about your
> > compilation and linking flags.
> > 
> > I actually have the following flags with gcc 3.4.6:
> > 
> > CFLAGS="-O3 -march=pentium4 -pipe -msse -msse2 -mmmx -pipe
> > -fomit-frame-pointer -fforce-addr -fno-ident -ftracer -fweb"
> > 
> > CHOST="i686-pc-linux-gnu" 
> > CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" 
> > 
> > LDFLAGS="-Wl,-O1 -Wl,--sort-common"
> > 
> > I am not sure if the -O3 flag is good to have. It will compile
> > faster code in a few cases, but the load time of the programs will
> > be bigger. And it can compile buggy code in a few cases as programs
> > like the nec2 antenna simulation, it is why I have the -fforce-addr
> > flag. Look here if you want to know about some test I have done:
> > http://bugs.gentoo.org/show_bug.cgi?id=135550#c12
> > 
> > With the nec2 software, the resulting code was bigger with -O3 and
> > -fforce-addr as only with -O2, and the execution speed was the same.
> > But I have not done the same test with a sound related program, so I
> > don't know if I will get a speed improvement with -O3 and
> > -fforce-addr. The NEC2 software give the computation time it used to
> > compute a simulation, and I have no idea how I can get an equivalent
> > result with a sound program.
> > 
> > Another issue with gcc4 is at I know at it is some new optimisation
> > flags that can be useful with multimedia application, but I don't
> > know which flags they are. Have you any suggestion about fast and
> > reliable flags for gcc 4?
> > 
> > Cheers,
> > Dominique
> > 
> 
> Salut!
> 
> CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
> CXXFLAGS="${CFLAGS}"
> LDFLAGS="-Wl,-O1 -Wl,--sort-common"
> 
> No -O3 here, that just blows, and all that -msse2 -mmmx and all other
> cpu flags are covered by -march, no use to specify them, also not on
> gcc-3.4.6 - the compiler knows them from -march
> 
> Regards,
> Tom

And i might add that those are my systemwide settings, of course. And i
was already a bit confused if those LDFLAGS are good/help anything, but
so for no problems. I will definately keep them all defensive.

For testing "harder" flags there is, YAY!  ..the modular portage now,
and already a module for per-package CFLAGS&LDFLAGS settings:
http://forums.gentoo.org/viewtopic-t-472386.html

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/