Просмотр исходного кода

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 <thomas.petazzoni@bootlin.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Julien Olivain 3 месяцев назад
Родитель
Сommit
a33e1af4a0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      support/scripts/gen-bootlin-toolchains

+ 1 - 1
support/scripts/gen-bootlin-toolchains

@@ -363,7 +363,7 @@ class Toolchain:
                 selects.append("BR2_ENABLE_LOCALE")
                 selects.append("BR2_ENABLE_LOCALE")
 
 
             # thread support
             # thread support
-            if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS"):
+            if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS="):
                 selects.append("BR2_TOOLCHAIN_HAS_THREADS")
                 selects.append("BR2_TOOLCHAIN_HAS_THREADS")
 
 
             if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG"):
             if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG"):