LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   what -march= optimisation flag for AMD64 ? (https://www.linuxquestions.org/questions/linux-general-1/what-march%3D-optimisation-flag-for-amd64-269846/)

qwijibow 12-24-2004 03:26 AM

what -march= optimisation flag for AMD64 ?
 
hey guys, imstalling gentoo on my new AMD64 machine.
the gentoo handbook has this to sayy aboout the march flag in make.conf

# AMD64 users who want to use a native 64 bit system should not use athlon-xp

so what -march= flag do i use to optimise for AMD64 ?

oneandoneis2 12-24-2004 04:00 AM

Quote:

The name of the CPU is "k8", but you don't need to put it as a -march=k8 since there is only one x86-64 CPU out there anyways. Some versions of GCC will not recognize -march=k8 and will FAIL if it is set. There are also issues with -fPIC, many packages require it to work properly, I would recommend to add it to the global CFLAGS, even if it costs a little performance. The GCC version provided with Gentoo for AMD64 is a pure 64bit compiler, it will not produce 32bit under any circumstance so using -m64 is useless and trying to use it with -m32 will fail.

Penguin of Wonder 04-27-2006 08:20 AM

The handbook, if your using the right version, tells which flag to use for AMD64 machines.

Penguin of Wonder 04-27-2006 11:01 AM

Quote:

Originally Posted by oneandoneis2
The name of the CPU is "k8", but you don't need to put it as a -march=k8 since there is only one x86-64 CPU out there anyways. Some versions of GCC will not recognize -march=k8 and will FAIL if it is set. There are also issues with -fPIC, many packages require it to work properly, I would recommend to add it to the global CFLAGS, even if it costs a little performance. The GCC version provided with Gentoo for AMD64 is a pure 64bit compiler, it will not produce 32bit under any circumstance so using -m64 is useless and trying to use it with -m32 will fail.

I've never had any trouble with my march flag set k8?

nx5000 04-28-2006 05:31 AM

For Opteron/Athlon64/Hammer/K8, the kernel uses -march=k8 and if it fails it tries -march=athlon


All times are GMT -5. The time now is 05:56 AM.