Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-09-2010, 02:08 AM   #1
LQ Newbie
Registered: Dec 2010
Posts: 19

Rep: Reputation: 0
GCC option to select cpu type


My development target environment is intel corei5 architecture. I want to build my source for i5 architecture. I am paning to use gcc 4.5.1. In the gcc manual i found an option to select the cpu type(-mtune = cpu_type).There is no i5 processor in the cpu type options.

If i use -mtune=generic, will it produce optimized code for i5 architecture or it will produce the code for generic x86_64 architecture?

Old 12-09-2010, 02:20 AM   #2
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 218

Rep: Reputation: 27
you should try the forums here:

good luck
Old 12-09-2010, 10:39 AM   #3
Senior Member
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,256

Rep: Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420
You can use -mtune=native to optimize programs for the computer you're compiling on. Note that the -mtune options only affects ordering of instructions, but -march will enable use of instructions only available on the specified cpu. See Intel 386 and AMD x86-64 Options.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web form retrieve <select><option> with PHP esteeven Programming 2 08-01-2009 04:18 AM
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 03:28 PM
Determine the event type with select LonelyStar Programming 8 09-08-2008 01:32 AM
select on simple data type? Thinking Programming 1 08-20-2005 08:56 PM
GCC has option for Xeon cpu ??? xudeyong Programming 1 05-22-2003 02:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration