Re: [kconfig][RFC] getting things like CONFIG_ARCH_HAS_SYSCALL_WRAPPER without bothering with selects
From: Linus Torvalds
Date: Tue Aug 09 2022 - 19:52:58 EST
On Tue, Aug 9, 2022 at 3:57 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> However, kconfig could do (1) without selects - something like
> bool ARCH_HAS_BAR_H
> def_bool $(header-exists,bar.h)
>
> Does anybody see problems with the patch below?
I like the concept, but I'm not entirely sure how generic it is. How
many of those "arch has this header" do we really end up having?
Just looking at some of the "ARCH_HAS_XYZ" options, very few strike me
as being about a header file existing.
I'm not saying you picked the _only_ such case, but it doesn't seem
_entirely_ impossible that you did..
Looking at some of the other cases, they might be more interested in
not "does it have a header file", but "can I grep for this symbol
name"?
And that kind of "do you expose symbol XYZ in header ABC" query might
work for this ARCH_HAS_SYSCALL_WRAPPER case too?
So that seems like it might potentially be a more general-purpose
Kconfig helper. Hmm?
Linus