[PATCH v2 1/8] linux/kconfig.h: simplify logic for choosing CONFIG_{SPL_, TPL_, }*

Bin Meng bmeng.cn at gmail.com
Tue Jul 7 09:17:53 CEST 2020


On Sat, Jul 4, 2020 at 12:37 AM Simon Glass <sjg at chromium.org> wrote:
>
> From: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
>
> Instead of using the arg1_or_junk trick to pick between two choices,
> with a bit of duplication between the branches (and most of the
> CONFIG_TPL_BUILD case being redundant, as _IS_TPL is known to be
> defined to 1 in that case), simply define a prefix that we inject
> between CONFIG_ and the given config symbol.
>
> This only requires one level of indirection (to get the
> _CONFIG_PREFIX macro expanded before the token concatenation takes
> place), and makes it easy to, say, introduce a CONFIG_HOSTTOOL_
> prefix. [I would expect most HOSTTOOL_ symbols to just be def_bool y,
> but it would allow us to clean up some of the ifdef HOSTCC mess in the
> sources shared between U-Boot and host tools.]
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  include/linux/kconfig.h | 27 ++++++++-------------------
>  1 file changed, 8 insertions(+), 19 deletions(-)
>

applied to u-boot-x86, thanks!


More information about the U-Boot mailing list