Re: Proposal: Simplify or Remove Compiler Version Details from Kernel Banner
Date: Fri, 13 Mar 2026 16:05:59 UTC
> On Mar 13, 2026, at 5:12 AM, Dimitry Andric <dim@FreeBSD.org> wrote: > > On 13 Mar 2026, at 12:07, Haowu Ge(葛豪武) <gehaowu@bitmoe.com> wrote: >> >> Given that FreeBSD now exclusively uses Clang, the full compiler version string—particularly the part containing the GitHub URL—originally introduced to support GCC/Clang coexistence, > > You can still compile FreeBSD with gcc, if you want. The compiler version string inserted into the kernel's banner is simply the first line of "$CC -v" output. The linker version string is handled similarly. > > The way clang prints its version information is determined by upstream, see https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Version.cpp. > > The FreeBSD version of clang uses almost the same format as upstream, except for the following differences: > * We set CLANG_VENDOR to "FreeBSD". > * We use the "git describe" version of the commit hash, since it is more informative than a long string of hex digits. Hi Haowu! As Dimiitry noted, the compiler, git revision, etc, information has debug/diagnostic benefit to folks trying to support FreeBSD (developers, release engineers, etc). Is there a reason why you want to remove this information? It can be tuned via sys/conf/newvers.sh (that’s what $work does with their forked version of FreeBSD), but that interface is admittedly pretty clunky to customize. Cheers, -Enji