Read version and distro?

Patrick Fleming EA plug-discuss@lists.PLUG.phoenix.az.us
Thu, 15 Nov 2001 19:55:19 -0700 (MST)


On Thu, 15 Nov 2001, Kevin Buettner wrote:

> > 
> > 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.
> 


[pat@pf pat]$ cat /proc/version
Linux version 2.4.14 (root@pf.net.home) (gcc version 2.96 20000731 (Red 
Hat Linux 7.1 2.96-85)) #2 SMP Sun Nov 11 14:53:48 MST 2001

So if I understand your description of that string, it describes the gcc 
version- and looking closer that makes sense with the (()).
This is a compiled kernel and head /etc/issue gives:

Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.14 on an i686

on this box. I suppose that it would only give the next version if you 
install from RPMS...
Learn something new every day.

> 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
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 

-- 
Patrick Fleming, EA
Licensed to represent taxpayers
before Exam, Appeals, and Conference 
divisions of the IRS