Date: Tue, 13 Nov 2012 15:57:55 -0800 From: David Wolfskill <david@catwhisker.org> To: freebsd-current@freebsd.org Subject: Re: compiler info in kernel identification string Message-ID: <20121113235755.GE17755@albert.catwhisker.org> In-Reply-To: <20121113234303.GA15319@dft-labs.eu> References: <20121113234303.GA15319@dft-labs.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
--WK3l2KTTmXPVedZ6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 14, 2012 at 12:43:03AM +0100, Mateusz Guzik wrote: > Hello, >=20 > 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). >=20 > Here is my attempt: > http://people.freebsd.org/~mjg/patches/newvers-compiler.diff >=20 > Basically adds compiler name and version/revision after revision of > system sources. >=20 > Sample output from dirty git sources: > gcc: > FreeBSD 10.0-CURRENT #7 r242962=3D264d569-dirty(gcc-4.2.1-20070831): Wed > Nov 14 00:11:51 CET 2012 >=20 > clang: > FreeBSD 10.0-CURRENT #8 r242962=3D264d569-dirty(clang-r162107): Wed Nov 14 > 00:12:26 CET 2012 > ...=20 > I have no strong opinions on format, I just want this information easly > accessible. >=20 > 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 --=20 David H. Wolfskill david@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. --WK3l2KTTmXPVedZ6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCi3oIACgkQmprOCmdXAD3nbgCfWxAmUDhS7NA9FBV28Y+pHtiN /owAnjamV2HgFFkseMZXFAbDJB35SU87 =3+kO -----END PGP SIGNATURE----- --WK3l2KTTmXPVedZ6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121113235755.GE17755>