Re: [PATCH 2/2] kconfig: unify cc-option and as-option

From: Johannes Berg
Date: Tue May 04 2021 - 16:52:58 EST


On Wed, 2021-05-05 at 05:46 +0900, Masahiro Yamada wrote:
>
>  - This commit touches scripts/Kconfig.include.
>  - External module builds (M= builds) never invoke Kconfig
>
> Putting these two together, your claim is really odd.

Hmm.

> If external module builds invoke Kconfig,
> your kernel is already broken.

Well, it's not about the kernel, that's just the normal upstream (or
perhaps distribution) kernel.

Anyway, you're right, it's much simpler. The problem isn't invoking M=
or something like that, that happens much later and sent me on the
completely wrong track.

The problem is simply doing

make kernelversion

to determine the version of a tree that's not writable to the user, e.g.

make -C /lib/modules/$(uname -r)/build/ kernelversion

Which basically also means that it's harmless, since the version is of
course not affected by cc-option.

johannes