Re: [GIT PULL v2] Kbuild updates for v5.15-rc1

Segher Boessenkool
2021-09-06T17:30:10Z

On Mon, Sep 06, 2021 at 09:30:01AM -0700, Linus Torvalds wrote:
> On Mon, Sep 6, 2021 at 8:50 AM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> > Yes they are. It is the single standard way to get the functionality
> > you want.
>
> Sorry, but 'standard' is the part that the kernel simply doesn't do.
>
> Just face it. The kernel isn't written with all those standards that
> are designed for entirely different things in mind.

The kernel is written in C, and C is meant in part for implementing
things like kernels.

When I say "standard C" I mean "without the GNU C extensions". All C
compilers implement standard C. Only GCC implements all the GNU C
extensions, and implements most of them correctly.

> > I don't know why you think you can separate that. Take <stdarg.h> --
> > there is no other (portable, standard) way to implement receiving
> > variadic arguments.
>
> You clearly haven't actually read the thread.

?

Are you refering to something more than what is at
<https://lore.kernel.org/lkml/CAK7LNAQ0Q6CdXaD-dVGj_e3O3JYs_crpejWKpXHYQJYxyk-1VQ@mail.gmail.com/>
? I did read that. If I draw other conclusions, well, that happens.

> That was my whole argument. For the _historical_ situation.

But this whole thread is about removing uses of <stdarg.h>, and
eventually removing the
-nostdinc -isystem $(shell $(CC) -print-file-name=include)
thing (except in some places where it is next to impossible to
reimplement the compiler's implementation (instead of just very hard
and useless work, making all this more fragile in the process)).

That is not the past, that is the future. A bleak future, if technical
decisions are based on FUD like "compiler headers are dangerous".

Segher