View previous topic :: View next topic |
Author |
Message |
GSnake Tux's lil' helper
Joined: 10 Sep 2012 Posts: 120 Location: Italy
|
Posted: Fri Feb 22, 2013 11:28 pm Post subject: CPU Arch |
|
|
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 |
|
|
Pilsner Tux's lil' helper
Joined: 14 Mar 2008 Posts: 89
|
Posted: Sat Feb 23, 2013 6:30 am Post subject: |
|
|
For 64 bit desktop systems, arch=x86_64 is used. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21602
|
Posted: Sat Feb 23, 2013 4:36 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sat Feb 23, 2013 5:19 pm Post subject: |
|
|
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 |
|
|
GSnake Tux's lil' helper
Joined: 10 Sep 2012 Posts: 120 Location: Italy
|
Posted: Sat Feb 23, 2013 5:45 pm Post subject: |
|
|
How can I see what x86_64 produces? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sat Feb 23, 2013 5:53 pm Post subject: |
|
|
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 |
|
|
|