Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 04-26-2005, 04:19 AM   #1
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Rep: Reputation: 15
Identifying CPU/Architecture for GCC Optimisations

Is there a way to probe or somehow identify the type of machine I'm logged into, even if such information wasn't used to compile the kernel or other software? The purpose of the info is for the -mtune= and -mcpu= flags for GCC compilation.

This is half out of necessity, half out of curiosity (since I could always ask the owner of the machine in question).
Old 04-26-2005, 05:30 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658
Look at the man page for uname. There is 'uname -m' for machine, and 'uname -p' for processor, or use the long options --machine, --processor. I'm not sure when there would be a difference.
Old 04-26-2005, 08:23 AM   #3
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You can also view /proc/cpuinfo to see exactly what features your CPU supports (SSE, 3dnow, etc).

Old 04-27-2005, 10:44 PM   #4
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Original Poster
Rep: Reputation: 15
Excellent. Thanks for the help.


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
[CPU Architecture] Synesthesia Slackware 2 04-23-2005 06:30 PM
Compiler OPtimisations ShockTherapy Slackware 2 04-20-2004 11:19 AM
GCC has option for Xeon cpu ??? xudeyong Programming 1 05-22-2003 02:56 PM
General Question on CPU architecture CodeWarrior Linux - General 6 04-30-2003 09:39 PM
Optimise GCC for your CPU jatbudhwar Slackware 9 04-07-2003 08:00 PM

All times are GMT -5. The time now is 04:55 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