The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Built in ram limit for 64 bit kermit Linux 2 05-18-2007 12:42 PM
ksh built-in function solea Shell Programming and Scripting 1 09-23-2004 05:25 AM
built-in hex editor? Loriel Shell Programming and Scripting 6 08-17-2004 02:16 AM
BUILT-IN command scripts JSP Shell Programming and Scripting 2 03-11-2002 06:52 AM
awk built in variables Reza Nazarian UNIX for Dummies Questions & Answers 4 02-17-2002 10:50 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-19-2007
deckard's Avatar
Registered User
 

Join Date: Jul 2002
Location: Ohio
Posts: 110
Which GCC Built My Kernel?

I'm playing around with the kqemu accelerator for the QEMU virtualization software. I can't remember which version of gcc I used to build my kernel. I have 3.4.6 and 4.1.1 on this (Gentoo) system. I seem to remember there is some command I can run against binaries that will tell me what gcc (and linker, etc..) built them. so far my searches have only turned up:

gcc -v (Shows me what version of GCC I have)

and

uname -a (which shows me all the kernel info except which GCC built it)

Any suggestions?
Reply With Quote
Forum Sponsor
  #2  
Old 06-19-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Try nm on the binary and see what symbols it spits out.
Reply With Quote
  #3  
Old 06-19-2007
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
Quote:
Originally Posted by porter View Post
Try nm on the binary and see what symbols it spits out.
But if the binary is stripped i.e. built with the -s flag, then I dont think nm will output anything.
Reply With Quote
  #4  
Old 07-17-2007
Registered User
 

Join Date: Feb 2006
Posts: 18
cat /proc/version | head -n1 | cut -d" " -f1-3,5-7
Reply With Quote
  #5  
Old 07-17-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,197
Code:
awk '{print $5,$6,$7}' /proc/version
or just
Code:
awk '{print $7}' /proc/version
to get the version number directly - 4.1.1 in my case.

Last edited by sysgate; 07-17-2007 at 06:02 AM.
Reply With Quote
  #6  
Old 08-07-2007
deckard's Avatar
Registered User
 

Join Date: Jul 2002
Location: Ohio
Posts: 110
Thanks!

I've been on vacation, but the answers referring to /proc/version are exactly what I needed!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0