The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Gentoo
.
google unix.com



Gentoo Gentoo Linux is a versatile and fast, completely free Linux distribution geared towards developers and network professionals.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-19-2007
deckard's Avatar
deckard deckard is offline
Registered User
  
 

Join Date: Jul 2002
Location: Ohio
Posts: 135
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?
  #2 (permalink)  
Old 06-19-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Try nm on the binary and see what symbols it spits out.
  #3 (permalink)  
Old 06-20-2007
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
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.
  #4 (permalink)  
Old 07-17-2007
this213 this213 is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 18
cat /proc/version | head -n1 | cut -d" " -f1-3,5-7
  #5 (permalink)  
Old 07-17-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
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 09:02 AM..
  #6 (permalink)  
Old 08-07-2007
deckard's Avatar
deckard deckard is offline
Registered User
  
 

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

I've been on vacation, but the answers referring to /proc/version are exactly what I needed!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0