compiler info in kernel identification string

Andriy Gapon avg at FreeBSD.org
Fri Nov 16 10:57:32 UTC 2012


[cc list trimmed]

on 16/11/2012 12:43 Erik Cederstrand said the following:
> Den 16/11/2012 kl. 11.18 skrev Andriy Gapon <avg at freebsd.org>:
> 
>> This is starting to turn into a bikeshed, but anyway...
>> 
>> on 16/11/2012 12:00 Daniel Braniss said the following:
>>> the question as to what compiler was used to compile the kernel is a bit
>>> of an oxymoron, since the kernel is made up of many different modules,
>>> which get compiled either by different compilers, or different compiler
>>> flags.
>> 
>> The canonical way to compile a kernel is to use buildkernel and compile
>> modules along with the kernel.  Other configurations are supported too, of
>> course.
>> 
>>> since the compiler does 'sign' the modules it compiles (and clang
>>> will/should do it soon: http://llvm.org/bugs/show_bug.cgi?id=7292) some
>>> tool like file(1) could be modified to provide it, or config -x (8) ...
>> 
>> The key word in your note about clang is 'soon' as in 'not yet'.
>> 
>> Besides, when I see a bug report with a dmesg *I* want to immediately know
>> what compiler was used there.
> 
> But wouldn't you want to know the compiler flags, too? And the kernel config
> file?  src.conf? Local patches? To solve a bug, in general you would want
> sufficient information to recreate the environment locally. Compiler version
> is not enough.

It depends.  OK?

> So either you have all information in every binary, because they might have
> been built outside a buildworld, or you have the general buildworld /
> buildkernel configuration in a central place and expect users to supply
> information about whatever non-standard setup they did.



-- 
Andriy Gapon


More information about the freebsd-current mailing list