Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
How can I find out what gcc versions I have installed? And how to find out what the kernel was compiled with which gcc version?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Nov 2004
    Posts
    208

    HOW-TO: find out kernel gcc versions.... woes :S


    How can I find out what gcc versions I have installed? And how to find out what the kernel was compiled with which gcc version?

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    for gcc:
    Code:
    gcc --version
    for kernel, look at:
    Code:
    uname -a
    for kernel version, look at
    Code:
    uname -r
    Life is complex, it has a real part and an imaginary part.

  3. #3
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    I'm not sure about the kernel part but to find out which version of gcc you have type

    Code:
    gcc --version
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  4. #4
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    apparently I was about 2 seconds late on this one. LOL
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  5. #5
    Linux Newbie
    Join Date
    Nov 2004
    Posts
    208
    Still can't find out what version of gcc was used to compile the current kernel...

  6. #6
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    I don't think it is possible to find out which version of gcc was used to compile the kernel you are using unless you compiled the kernel yourself (then it is the gcc version you are using.)

    However it may be safe to assume that if you haven't updated your kernel, it was compiled by the people who made the distro using whatever version of gcc which is found on your system.
    Life is complex, it has a real part and an imaginary part.

  7. #7
    Linux Newbie
    Join Date
    Nov 2004
    Posts
    208
    Okay. What gcc version do you think compiled Fedora Core 4 initial kernel?

  8. #8
    Linux User nalg0rath's Avatar
    Join Date
    Sep 2004
    Location
    Stockholm
    Posts
    303
    It is probably compiled using gcc 4.0 as the rest of Fedora Core 4, to quote the FC4 Release Notes "Fedora Core 4 has been built using GCC 4.0, which is included with the distribution.".

  9. #9
    Just Joined! brother_mick's Avatar
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    65
    To find out what gcc version was used to compile your kernel.

    Code:
    cat /proc/version
    On my system this produces the following.

    Linux version 2.6.12.3.20051709 (root@home-02) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Sat Sep 17 16:29:38 BST 2005
    The gcc version is the version used to compile the kernel.

  10. #10
    Linux Newbie
    Join Date
    Nov 2004
    Posts
    208
    Quote Originally Posted by brother_mick
    To find out what gcc version was used to compile your kernel.

    Code:
    cat /proc/version
    On my system this produces the following.

    Linux version 2.6.12.3.20051709 (root@home-02) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Sat Sep 17 16:29:38 BST 2005
    The gcc version is the version used to compile the kernel.
    Thanks man. That does the trick! If a system does not have the kernel linux headers/scripts... how does one get them again?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •