Re: compiler info in kernel identification string

From: David Wolfskill <david_at_catwhisker.org>
Date: Tue, 13 Nov 2012 15:57:55 -0800
On Wed, Nov 14, 2012 at 12:43:03AM +0100, Mateusz Guzik wrote:
> Hello,
> 
> avg_at_ suggested to include compiler version in the kernel so that it's
> present in uname (and one can easly tell what was used to compile it).
> 
> Here is my attempt:
> http://people.freebsd.org/~mjg/patches/newvers-compiler.diff
> 
> Basically adds compiler name and version/revision after revision of
> system sources.
> 
> Sample output from dirty git sources:
> gcc:
> FreeBSD 10.0-CURRENT #7 r242962=264d569-dirty(gcc-4.2.1-20070831): Wed
> Nov 14 00:11:51 CET 2012
> 
> clang:
> FreeBSD 10.0-CURRENT #8 r242962=264d569-dirty(clang-r162107): Wed Nov 14
> 00:12:26 CET 2012
> ... 
> I have no strong opinions on format, I just want this information easly
> accessible.
> 
> Comments?
> ....

I like the idea, but I have long found the idea of putting this type of
logic (including VCS-awareness) in newvers.sh itself something that is
prone to turn what should be a rather simple script into a ... mess.

What I have been using for several months has been a modified newvers.sh
that uses an externally-defined function (from a file that is sourced)
to handle whatever VCS-specific things I think are appropriate.  (Thus,
folks who want to use one VCS don't need to have newvers.sh test for
VCSen they don't use; they could also provide a sample file that
provides the function.  An installation could use a symlink to point to
the function definition of choice....  We could even have a "kitchen
sink" default, that goes through all the hoops & gyrations the current
code does, if folks want that.)

Extending that to define a function for compiler-awareness should be
straightforward -- and (IMO) avoid cluttering newvers.sh even more.

Caveat: I'm not a committer.  I do exercise newvers.sh a bit more than
many folks, though.  :-}

Peace,
david
-- 
David H. Wolfskill				david_at_catwhisker.org
Taliban: Evil men with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

Received on Tue Nov 13 2012 - 22:57:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC