From owner-freebsd-current@FreeBSD.ORG Wed Nov 14 07:02:04 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 2A21CF71; Wed, 14 Nov 2012 07:02:04 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id C22218FC16; Wed, 14 Nov 2012 07:02:03 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1TYWyx-0003b5-CF; Wed, 14 Nov 2012 09:01:55 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: Mateusz Guzik , freebsd-current@freebsd.org, avg@freebsd.org Subject: Re: compiler info in kernel identification string In-reply-to: <20121113234303.GA15319@dft-labs.eu> References: <20121113234303.GA15319@dft-labs.eu> Comments: In-reply-to Mateusz Guzik message dated "Wed, 14 Nov 2012 00:43:03 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Nov 2012 09:01:55 +0200 From: Daniel Braniss Message-ID: X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 07:02:04 -0000 > Hello, > > 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: > 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 > > Sample output from svn with gcc: > FreeBSD 10.0-CURRENT #1 r243006:243007M(gcc-4.2.1-20070831): Wed Nov 14 > 00:41:23 CET 2012 > > I have no strong opinions on format, I just want this information easly > accessible. > > Comments? in the old days (I'm talking before C :-) I remmeber one compiler putting such info in the code it produced, I wonder if that's the case with gcc/clang, and if so it would be nice if file(1) could show it. my 3c, danny