From owner-freebsd-current@FreeBSD.ORG Tue Nov 13 23:57:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 934919FA for ; Tue, 13 Nov 2012 23:57:56 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 441018FC16 for ; Tue, 13 Nov 2012 23:57:56 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id qADNvtQF020193 for ; Tue, 13 Nov 2012 15:57:55 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id qADNvtr9020192 for freebsd-current@freebsd.org; Tue, 13 Nov 2012 15:57:55 -0800 (PST) (envelope-from david) Date: Tue, 13 Nov 2012 15:57:55 -0800 From: David Wolfskill To: freebsd-current@freebsd.org Subject: Re: compiler info in kernel identification string Message-ID: <20121113235755.GE17755@albert.catwhisker.org> References: <20121113234303.GA15319@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WK3l2KTTmXPVedZ6" Content-Disposition: inline In-Reply-To: <20121113234303.GA15319@dft-labs.eu> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-current@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 23:57:56 -0000 --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--