Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what should be -march?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mansniks
Apprentice
Apprentice


Joined: 19 Nov 2007
Posts: 290

PostPosted: Mon Apr 14, 2008 10:20 am    Post subject: what should be -march? Reply with quote

Hello,

if I want to compile programs on amd64 Athlon and run them on 64 bit Xeon too, what should be g++ options?
Currently I have :

-m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40

Thank you!
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Mon Apr 14, 2008 10:36 am    Post subject: Reply with quote

it should be -march=x86-64 for compatibility with intels 64 bit cpu's, and you'd probably be better off with -O2 rather than -O3...
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
mansniks
Apprentice
Apprentice


Joined: 19 Nov 2007
Posts: 290

PostPosted: Mon Apr 14, 2008 11:23 am    Post subject: Reply with quote

Thanks, what is the difference between -O2 and -O3?
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Apr 14, 2008 12:36 pm    Post subject: Reply with quote

mansniks wrote:
Thanks, what is the difference between -O2 and -O3?

1
Back to top
View user's profile Send private message
mansniks
Apprentice
Apprentice


Joined: 19 Nov 2007
Posts: 290

PostPosted: Mon Apr 14, 2008 1:22 pm    Post subject: Reply with quote

Ooooo, funny, right? :)
Anyway, I'm not really interested about it...
Back to top
View user's profile Send private message
zoni
n00b
n00b


Joined: 04 Sep 2006
Posts: 60
Location: The Netherlands

PostPosted: Mon Apr 14, 2008 5:02 pm    Post subject: Reply with quote

mansniks wrote:
Thanks, what is the difference between -O2 and -O3?


http://gentoo-wiki.com/CFLAGS#-O2_or_-O3.3F

I'd recommend reading through that entire page if you can spare the time.
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Mon Apr 14, 2008 5:34 pm    Post subject: Reply with quote

widremann wrote:
mansniks wrote:
Thanks, what is the difference between -O2 and -O3?

1
:lol:

http://www.gentoo.org/doc/en/gcc-optimization.xml#doc_chap2_sect3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum