On Wednesday 27 September 2006 07:50, Daniel Iliev wrote:

>
> 1) I use CFLAGS="-march=athlon64 -mfpmath=sse -msse -msse2 -msse3
> -m3dnow -mmmx -O3 -fomit-frame-pointer -pipe -fpic". P

-mfpmath=sse not needed. amd64 uses sse for math by default. remove that flag
-msse not needed, see above
-msse2 not needed, see above
-msse3 can be set, but only if your CPU supports it. Not all CPUs do. 
Check /proc/cpuinfo for 'pni'
-m3dnow just no. sse supersedes it. Also it is a '32bit flag'
-mmmx see above
-O3 don't do it. O2 is much, much safer and not really slower. It will prevent 
a lot of breakage.
-fomit-frame-pointer not needed
-pipe a good flag
-fpic NO! Really, really really no! Don't do it! It is just wrong. Stop it 
now! This flag is not needed! Even for prelink on 32bit it was never needed 
(because everything that could compiled with that flag set it anyway). 
Please, read the documentation and remove that flag ASAP.

so, march=k8 -O2 -pipe
would be the result, if you remove all superflous and dangerous flags.


>
> 2) I see too many flags that are disabled by the profile - the kind with
> the parenthesis around them, like "(-3dnow)". Why? As I mentioned above
> I enable some of these through my CFLAGS - e.g. (-mmx), (-mmxext),
> (-sse) and (-sse2) and everything works perfect.

because 3dnow, mmx&co are useflags for 32bit code that was optimized for that 
extensions. If you use that code in 64bit apps, certain breakage is the 
result. And if something does not break, it will be A LOT slower.

Don't use that flags. They are bad for amd64. Trust the devs, they know better 
than you or me.
-- 
gentoo-amd64@gentoo.org mailing list

Reply via email to