LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-24-2004, 03:26 AM   #1
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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 ?
 
Old 12-24-2004, 04:00 AM   #2
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
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.
 
Old 04-27-2006, 08:20 AM   #3
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
The handbook, if your using the right version, tells which flag to use for AMD64 machines.
 
Old 04-27-2006, 11:01 AM   #4
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
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?
 
Old 04-28-2006, 05:31 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling 32bit gentoo, on AMD64, what CHOST= flag? qwijibow Linux - General 1 12-24-2004 06:21 AM
-march optimisation for kernel BenPope Linux - General 2 09-03-2003 11:36 AM
Hard drive access optimisation chakkerz Linux - Newbie 2 07-08-2003 06:51 AM
Compiling (GCC) - Optimisation anonE9 Programming 5 03-15-2003 08:20 PM
debian source package optimisation rlpt Linux - General 1 03-17-2002 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration