Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CPU Arch
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
GSnake
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2012
Posts: 100
Location: Italy

PostPosted: Fri Feb 22, 2013 11:28 pm    Post subject: CPU Arch Reply with quote

Hello guys. I'm using the march=native to build my apps but...

I've got an Intel i7 2600k (Desktop) and a i5 (don't remember what) for my laptop.

What should I put instead of march=native? Just a standard arch=x86_64?

Thank you guys!
Back to top
View user's profile Send private message
Pilsner
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2008
Posts: 83

PostPosted: Sat Feb 23, 2013 6:30 am    Post subject: Reply with quote

For 64 bit desktop systems, arch=x86_64 is used.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9061

PostPosted: Sat Feb 23, 2013 4:36 pm    Post subject: Reply with quote

Pilsner wrote:
For 64 bit desktop systems, arch=x86_64 is used.
For 64 bit systems, -march=x86_64 can be used. However, more specific values are legal if all the CPUs in question understand the features enabled by that more specific value. The OP needs to find the highest -march that enables only features present on both his laptop and desktop CPUs. If I recall correctly, -march=core2 produces code that runs correctly on all the Intel iN CPUs. A higher value may be possible.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32112
Location: 56N 3W

PostPosted: Sat Feb 23, 2013 5:19 pm    Post subject: Reply with quote

GSnake,

Find out what -march=native produces on both systems.
Now set CFLAGS= to all the items they have in common.

Thats as good as it gets. Its not quite that easy, as the common -march may be neither.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GSnake
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2012
Posts: 100
Location: Italy

PostPosted: Sat Feb 23, 2013 5:45 pm    Post subject: Reply with quote

How can I see what x86_64 produces?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32112
Location: 56N 3W

PostPosted: Sat Feb 23, 2013 5:53 pm    Post subject: Reply with quote

GSnake,

There has been a similar discussion here earlier today.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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