Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Generic amd64 CHOST & CFLAGS?
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: Sat Apr 05, 2008 7:09 pm    Post subject: Generic amd64 CHOST & CFLAGS? Reply with quote

Hello,

I'm interested in choosing such CHOST and CFLAGS in my make.conf, that I can run my OS copies on AMD Athlon64 X2 and on some Opterons too. What would those variables be and how much of performance can I loose? Is it even worth to choose other but most general instruction sets nowdays? How about running same OS on both AMD and intel 64 bit?

The thing is - I did optimized for prescott once, but when I had to move things to p-m, it took so much recompile... Uhhh. And I don't really know if it was work that time and work. Gentoo was once best because of optimization, but is it still?
Thanks for advice!
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: Sat Apr 05, 2008 8:17 pm    Post subject: Reply with quote

-march= k8, opteron, athlon64, athlon-fx are all the exact same thing, you shouldn't have any issues running the same 64-bit binaries on any amd x86_64 cpu (unless you add -msse3 yourself, which the older cpu's don't support).

For amd and intel compatibility, yuo'll need to stick with -march=x86-64, you may be able to add some -mmmx and -msse flags (which are ommon to both), the gcc docs don't seem to list the extensions enabled by -march=x86-64...
_________________
"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: Sun Apr 06, 2008 7:07 am    Post subject: Reply with quote

Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse?
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: Sun Apr 06, 2008 7:14 am    Post subject: Reply with quote

mansniks wrote:
Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse?
Considerably?

I seriously doubt it would be even remotely noticeable...

All your really losing is 3dnow support.

You could use -mtune, ie "-O2 -march=x86-64 -mtune=k8 -pipe", then it would be "optimized" for all the amd 64 bit cpu's, but the binaries would still run just fine on intel's chips.
_________________
"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: Sun Apr 06, 2008 3:42 pm    Post subject: Reply with quote

Ok, I already choose x86-64. Ridiculous discussion about avatar by the way :)
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun Apr 06, 2008 4:25 pm    Post subject: Reply with quote

mansniks wrote:
Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse?


You won't notice any performance decrease, even if you used i686. The performance gain obtained from CFLAGS in widely overrated. And it's only *noticeable* in programs that use the extra instructions for anything important (tipical examples: mencoder and blender).
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