LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2009, 05:58 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Linux kernel and GCC?


This might be a stupid question but here it is anyways:

How to find out with which version of GCC your current Linux kernel is compiled with?

I am not talking about my system's GCC version which I know I can find out by:
Code:
gcc -v

Last edited by kushalkoolwal; 04-02-2009 at 06:06 PM.
 
Old 04-02-2009, 06:17 PM   #2
furryfreak
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Don't think you can... but it might be worth trying an objdump on it to find any debugging symbols gcc may have created. gcc (or maybe gas or ld) often puts an ascii string near the end of elf objects, but i'm not sure about pure binaries such as the kernel

Last edited by furryfreak; 04-02-2009 at 06:19 PM.
 
Old 04-02-2009, 06:22 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Hmm.. I thought it would be easy to do so...

i asked this question because while installing VMWare i got the following warning message:
Code:
Your kernel was built with "gcc" version "4.1.3", while you are trying to use  "/usr/bin/gcc" version "4.3.2".
I got curious and I wanted to find out how to know the GCC version of compiled kernel.

Anyone if has any idea please let us know.
 
Old 04-02-2009, 10:32 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Mmmm

Code:
cat /proc/version
 
Old 04-03-2009, 09:29 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
GCC does provide meta-symbols that equate to the compiler-version, allowing this information to be incorporated into source-code automatically.
 
Old 04-03-2009, 09:42 AM   #6
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Look at the start of dmesg.Mine gives:

Code:
ade@Pc1:~$ dmesg
BIOS EBDA/lowmem at: 0009f000/0009f000
Initializing cgroup subsys cpuset
Linux version 2.6.28-amd64custom (root@Pc1) (gcc version 4.3.2 (Debian 4.3.2-1) ) #1 SMP Thu Jan 1 16:10:48 GMT 2009
Regards.
The trooper.
 
  


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
compiling linux kernel 2.4 using gcc-4.1 isalmbio Linux - Kernel 4 06-18-2007 01:29 PM
compiling linux kernel 2.4 using gcc-4.1 isalmbio Debian 1 06-17-2007 01:36 PM
Need help with Puppy Linux (GCC or Kernel 2.6) linux-rulz Linux - Distributions 2 07-03-2005 10:43 PM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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