From a33e1af4a01cab51988fba8bbb02b94f7ed28ecf Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Sun, 21 Sep 2025 18:17:21 +0200 Subject: [PATCH] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times The Bootlin external toolchain file Config.in.options contains multiple occurrences of "select BR2_TOOLCHAIN_HAS_THREADS". See for example [1]. This file is generated by the support/scripts/gen-bootlin-toolchains script from the information published at [2]. Those multiple occurrences happens with toolchains having BR2_TOOLCHAIN_HAS_THREADS_DEBUG and/or BR2_TOOLCHAIN_HAS_THREADS_NPTL. Since the script uses the startswith() method, the _HAS_THREADS selection is also generated for _HAS_THREADS_DEBUG and _HAS_THREADS_NPTL. See [3]. This commit solve the issue by adding a '=' character to make sure the test will be distinct from other strings having the same prefix. Note: there is no functional problem due to those multiple selections, since it is allowed by Kconfig. This commit is simply cosmetic, for correctness. [1] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.08/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options#L167 [2] https://toolchains.bootlin.com/ [3] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.08/support/scripts/gen-bootlin-toolchains#L366 Cc: Thomas Petazzoni Acked-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- support/scripts/gen-bootlin-toolchains | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains index 78123ed1a7..75fa2c7e0f 100755 --- a/support/scripts/gen-bootlin-toolchains +++ b/support/scripts/gen-bootlin-toolchains @@ -363,7 +363,7 @@ class Toolchain: selects.append("BR2_ENABLE_LOCALE") # thread support - if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS"): + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS="): selects.append("BR2_TOOLCHAIN_HAS_THREADS") if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG"):