Date: Fri, 16 Nov 2012 00:35:15 +0100 From: Mateusz Guzik <mjguzik@gmail.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: freebsd-current@FreeBSD.org, Andriy Gapon <avg@FreeBSD.org> Subject: Re: compiler info in kernel identification string Message-ID: <20121115233515.GB19671@dft-labs.eu> In-Reply-To: <50A5753D.5000001@FreeBSD.org> References: <20121113234303.GA15319@dft-labs.eu> <50A5540D.2030707@FreeBSD.org> <50A5753D.5000001@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 16, 2012 at 12:05:33AM +0100, Dimitry Andric wrote: > For starters, this hardcodes the compiler names "gcc" and "clang", and > this will include incorrect information into the kernel version string, > if you use another setting for ${CC}. > Yes, I blindly assumed that both gcc and clang will keep format of --version. For everything else you would get 'unknown-compiler'. > > Last but not least, I am not sure this information belongs in uname at > all. Maybe it would be better to put it somewhere else, in a sysctl, or > show it in dmesg. As stated in original mail, I don't have strong opinions on this. I only care about accessibility of this information. So, here is my patch that adds information at boot time and sysctl kern.compiler: http://people.freebsd.org/~mjg/patches/compiler-info.diff Sample output: Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #281 r243095=c24a389-dirty: Fri Nov 16 00:24:46 CET 2012 f@lap:/usr/obj/i386.i386/srv/repos/freebsd/sys/DEVEL i386 Compiled with cc (GCC) 4.2.1 20070831 patched [FreeBSD] <------ HERE WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. CPU: Intel(R) Core(TM)2 Duo CPU P9600 @ 2.66GHz (2635.19-MHz 686-class CPU) [..] As you can see only first line is captured and I go with assumption that --version works, I hope this is ok. -- Mateusz Guzik <mjguzik gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121115233515.GB19671>