compiler info in kernel identification string
david at catwhisker.org
Tue Nov 13 23:57:56 UTC 2012
On Wed, Nov 14, 2012 at 12:43:03AM +0100, Mateusz Guzik wrote:
> avg@ 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:
> Basically adds compiler name and version/revision after revision of
> system sources.
> Sample output from dirty git sources:
> FreeBSD 10.0-CURRENT #7 r242962=264d569-dirty(gcc-4.2.1-20070831): Wed
> Nov 14 00:11:51 CET 2012
> 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
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. :-}
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the freebsd-current