Re: [GIT PULL v2] Kbuild updates for v5.15-rc1
From: Florian Weimer
Date: Mon Sep 06 2021 - 14:28:05 EST
* Linus Torvalds:
> We use the compiler intrinsics without the C library header files for
> everything else, so doing so for <stdarg.h> seems to actually be a
> clarification and improvement.
This is an exaggeration. On several architectures, the kernel cannot
use the vector built-ins directly. Some of the implementing headers are
very special and intertwined with the compiler. <stdarg.h> is currently
not such a case, but it's just not technically not feasible to avoid
dependencies on all compiler headers. I think this considerably weakens
the case against <stdarg.h> because the compiler version is so obviously
harmless.
What the kernel is doing here is imposing an unnecesary constraint on
compiler development. Basically, you are telling compiler writers that
implementing features with the help of header files is a bad idea
because it makes it more difficult to use them from the kernel. (See
the proposed exceptions for vector code.)
Thanks,
Florian