lkml.org 
[lkml]   [2021]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kconfig: forbid symbols that end with '_MODULE'
Masahiro Yamada <masahiroy@kernel.org> writes:

> Kconfig (syncconfig) generates include/generated/autoconf.h to make
> CONFIG options available to the pre-processor.
>
> The macros are suffixed with '_MODULE' for symbols with the value 'm'.
>
> Here is a conflict; CONFIG_FOO=m results in '#define CONFIG_FOO_MODULE 1',
> but CONFIG_FOO_MODULE=y also results in the same define.
>
> fixdep always assumes CONFIG_FOO_MODULE comes from CONFIG_FOO=m, so the
> dependency is not properly tracked for symbols that end with '_MODULE'.

It seem to me the problem is in autoconf.h/fixdep, not in the Kconfig
language.


> This commit makes Kconfig error out if it finds a symbol suffixed with
> '_MODULE'.

I know you don't care, but I will voice my objection, for the record:
Kconfig is used by projects other than the Linux kernel and some of
them do not use the autoconf.h functionality. For such projects this
restriction seems arbitrary and potentially backwards-incompatible.

\
 
 \ /
  Last update: 2021-08-25 17:43    [W:0.092 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site