[Intel-gfx] [PATCH] [v2] Kbuild: move to -std=gnu11
Linus Torvalds
torvalds at linux-foundation.org
Mon Feb 28 18:40:38 UTC 2022
On Mon, Feb 28, 2022 at 3:37 AM Arnd Bergmann <arnd at kernel.org> wrote:
>
> I think the KBUILD_USERCFLAGS portion and the modpost.c fix for it
> make sense regardless of the -std=gnu11 change
I do think they make sense, but I want to note again that people doing
cross builds obviously use different tools for user builds than for
the kernel. In fact, even not cross-building, we've had situations
where the "kbuild" compiler is different from the host compiler,
because people have upgraded one but not the other (upgrading the
kernel build environment is actually much easier than upgrading the
host build environment, because you don't need all the random
libraries etc, and you can literally _just_ build your own gcc and
binutils)
And we have *not* necessarily required that the host tools match the
kernel tools.
So I could well imagine that there are people who build their kernels,
but their host build environment might be old enough that -std=gnu11
is problematic for that part.
And note how any change to KBUILD_USERCFLAGS is reflected in KBUILD_HOSTCFLAGS.
So I would suggest that the KBUILD_USERCFLAGS part of the patch (and
the modpost.c change that goes with it) be done as a separate commit.
Because we might end up reverting that part.
Hmm?
Linus
More information about the Intel-gfx
mailing list