LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
GCC option to select cpu type


Hi

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?

Thanks
 
Old 12-09-2010, 01:20 AM   #2
austinium
Member
 
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 219

Rep: Reputation: 27
you should try the forums here:
http://www.intel.com/p/en_US/busines...=subhdr+devctr

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

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
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.
 
  


Reply



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 03: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 02:28 PM
Determine the event type with select LonelyStar Programming 8 09-08-2008 12:32 AM
select on simple data type? Thinking Programming 1 08-20-2005 07:56 PM
GCC has option for Xeon cpu ??? xudeyong Programming 1 05-22-2003 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:29 AM.

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