Re: [linux-audio-user] CFLAGS for compiling audio programs - a little advice

From: Reuben Martin <reuben.m@email-addr-hidden>
Date: Fri Apr 21 2006 - 19:07:53 EEST

On 4/21/06, Brian Dunn <job17and9@email-addr-hidden> wrote:
> I'm running gentoo, and upon reading the gcc flag descriptions i've
> determined that my cpu can support the following CFLAGS
> CFLAGS="-O2 -march=pentium4 -pipe -msse -msse2 -mmmx -mfpmath=sse"
> cat /proc/cpuinfo
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 15
> model : 2
> model name : Intel(R) Pentium(R) 4 CPU 2.66GHz
> stepping : 9
> cpu MHz : 2658.181
> cache size : 512 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 2
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
> bogomips : 5323.63
> and so that's what i've been compiling with. trouble is, rosegarden
> doesn't run at all before segfaulting, MusE does pretty well but sort of
> segfaults at random. so does anyone think that this instability could
> be related to overly agressive cflags?

Probably not. You're CFLAGS, while optimal, are not all that overly
agressive, and the people who write the ebuild scripts usually have
the scripts filter out CFLAG options that are known to cause problems.
Both these projects are a little unstable. (I personally don't have as
much trouble as you are describing, but I have found Muse a bit more
stable than rosegarden)

BTW: you can get rid of -mmmx -msse and -msse2. These are implied by
-march=pentium4. You might also consider adding -ffast-math. Make your
CXXFLAGS the same as your CFLAGS, but add -fvisibility-inlines-hidden.

> i think that the fmpath=sse might be a bad idea, as it sortof forces the
> compiler to use the floating point co-processor (?).
> in a more genral sense, will all my bells and whistles be used if i
> don't set these compile flags, and will they really make that much of a
> difference? how about xrun wise?
> Does anyone out there have good performace for audo apps with a simalar
> chip and what flags are you using?
> Thanks ahead of time, and if all this is already discussed somewhere, a
> link would be just dandy.
> Brian
Received on Fri Apr 21 20:15:13 2006

This archive was generated by hypermail 2.1.8 : Fri Apr 21 2006 - 20:15:14 EEST