Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times
@ 2025-09-21 16:17 Julien Olivain via buildroot
  2025-09-21 16:50 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Olivain via buildroot @ 2025-09-21 16:17 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

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>
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 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"):
-- 
2.51.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times
  2025-09-21 16:17 [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times Julien Olivain via buildroot
@ 2025-09-21 16:50 ` Thomas Petazzoni via buildroot
  2025-09-21 19:24   ` Julien Olivain via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-09-21 16:50 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Sun, 21 Sep 2025 18:17:21 +0200
Julien Olivain <ju.o@free.fr> wrote:

> 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>
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times
  2025-09-21 16:50 ` Thomas Petazzoni via buildroot
@ 2025-09-21 19:24   ` Julien Olivain via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2025-09-21 19:24 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

On 21/09/2025 18:50, Thomas Petazzoni via buildroot wrote:
> On Sun, 21 Sep 2025 18:17:21 +0200
> Julien Olivain <ju.o@free.fr> wrote:
> 
>> 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>
>> Signed-off-by: Julien Olivain <ju.o@free.fr>
> 
> Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

> 
> Thanks a lot!
> 
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-21 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 16:17 [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: avoid selecting _HAS_THREADS multiple times Julien Olivain via buildroot
2025-09-21 16:50 ` Thomas Petazzoni via buildroot
2025-09-21 19:24   ` Julien Olivain via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox