Read version and distro?

Kevin Buettner plug-discuss@lists.PLUG.phoenix.az.us
Thu, 15 Nov 2001 18:12:20 -0700


On Nov 15,  5:24pm, Nancy Sollars wrote:

> > On Thu, 15 Nov 2001, Kevin Buettner wrote:
> >
> > > On Nov 15,  4:43pm, Patrick Fleming EA wrote:
> > >
> > > > [pat@gw-fw realty]$ cat /proc/version
> > > > Linux version 2.4.2-2 (root@porky.devel.redhat.com) (gcc version 2.96
> > > > 20000731 (Red Hat Linux 7.1 2.96-79)) #1 Sun Apr 8 18:47:21 EDT 2001
> >               ^^^^^^^^^^^^^^^^^^
> 
> lol i think its wrong for the distro to be listed in /proc like that its
> like redhat are claiming its their kernel i think Linus himself had
> something similar to say about it.

No, I think you misunderstand the meaning of that string.  It is
referring to the version of gcc used to compile the kernel.  This is
very important because Red Hat (and probably other distributors too)
end up distributing a compiler which is *not* an officially released
FSF version.  Red Hat caught a lot of flack when they first released
gcc-2.96 because they were releasing a gcc snapshot that hadn't been
officially released by the FSF.  In order to (hopefully) mitigate
confusion over the version of the tool being used, Red Hat now puts
quite a lot in the version string of the compiler.

E.g, typing ``gcc -v'' on my Red Hat Linux 7.2 machine shows:

    [kev@mesquite kev]$ gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
    gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)

Just to be sure it's really 7.2:

    [kev@mesquite kev]$ head -1 /etc/issue
    Red Hat Linux release 7.2 (Enigma)

And note the compiler version used to compile the kernel on my 7.2
machine:

   [kev@mesquite kev]$ cat /proc/version
   Linux version 2.4.7-10 (bhcompile@stripples.devel.redhat.com) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)) #1 Thu Sep 6 16:46:36 EDT 2001

The kernel version is different, but the compiler used to compile the
kernel is the same as the one from Patrick's 7.1 kernel!

Kevin