View previous topic :: View next topic |
Author |
Message |
mansniks Apprentice

Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Apr 14, 2008 10:20 am Post subject: what should be -march? |
|
|
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 |
|
 |
Sadako Advocate


Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Mon Apr 14, 2008 10:36 am Post subject: |
|
|
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 |
|
 |
mansniks Apprentice

Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Apr 14, 2008 11:23 am Post subject: |
|
|
Thanks, what is the difference between -O2 and -O3? |
|
Back to top |
|
 |
widremann Veteran

Joined: 14 Mar 2005 Posts: 1314
|
Posted: Mon Apr 14, 2008 12:36 pm Post subject: |
|
|
mansniks wrote: | Thanks, what is the difference between -O2 and -O3? |
1 |
|
Back to top |
|
 |
mansniks Apprentice

Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Apr 14, 2008 1:22 pm Post subject: |
|
|
Ooooo, funny, right?
Anyway, I'm not really interested about it... |
|
Back to top |
|
 |
zoni n00b

Joined: 04 Sep 2006 Posts: 60 Location: The Netherlands
|
Posted: Mon Apr 14, 2008 5:02 pm Post subject: |
|
|
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 |
|
 |
neysx Retired Dev


Joined: 27 Jan 2003 Posts: 795
|
|
Back to top |
|
 |
|