uclibc: proper thread default on m68k and Microblaze
PATCH 1/1 uclibc: proper thread default on m68k and Microblaze
Traditionally, Buildroot has a default of enabling thread support. However, with the current construct of the thread choice in the uclibc package, the m68k and microblaze architecture end up with no thread support as the default.
In order to avoid having to explicit a more complicated "default" value for the choice, we take a simple approach:
- The "none" choice is moved at the end of the list, so that it is not selected as the default unless there is really no other thread implementation available.
- We make NPTL the default thread implementation.
- On architectures where NPTL is not available, the NPTL option will not be available, so Kconfig will automatically fallback to linuxthreads.
--- package/uclibc/Config.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
package/uclibc/Config.in +6 -4
@@ -47,15 +47,13 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE choice prompt "Thread library implementation" + # Use NPTL when available. If not available, kconfig will + # automatically fall back to linuxthreads. default BR2_PTHREADS_NATIVE - default BR2_PTHREADS if !BR2_USE_MMU help Use this option to select the thread library implementation that should be used in your toolchain. - config BR2_PTHREADS_NONE - bool "none" - config BR2_PTHREADS bool "linuxthreads" select BR2_TOOLCHAIN_HAS_THREADS
@@ -67,6 +65,10 @@ choice select BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU depends on !BR2_m68k && !BR2_microblaze + + config BR2_PTHREADS_NONE + bool "none" + endchoice config BR2_PTHREAD_DEBUG
Signature · 1 line
2.7.4
PATCH 1/1 uclibc: proper thread default on m68k and Microblaze
Hi,
Thomas Petazzoni wrote,
Quoted 12 lines
Traditionally, Buildroot has a default of enabling thread support. However, with the current construct of the thread choice in the uclibc package, the m68k and microblaze architecture end up with no thread support as the default.
In order to avoid having to explicit a more complicated "default" value for the choice, we take a simple approach:
- The "none" choice is moved at the end of the list, so that it is not selected as the default unless there is really no other thread implementation available.
Quoted 7 lines
- We make NPTL the default thread implementation.
- On architectures where NPTL is not available, the NPTL option will not be available, so
Kconfigwill automatically fallback to linuxthreads.Signed-off-by Thomas Petazzoni <[email protected]>
Makes sense to me.
You can add:
best regards
Waldemar
PATCH 1/1 uclibc: proper thread default on m68k and Microblaze
In reply to Thomas PetazzoniThomas, All,
On 2016-08-05 18:35 +0200, Thomas Petazzoni spake thusly:
Quoted 12 lines
Traditionally, Buildroot has a default of enabling thread support. However, with the current construct of the thread choice in the uclibc package, the m68k and microblaze architecture end up with no thread support as the default.
In order to avoid having to explicit a more complicated "default" value for the choice, we take a simple approach:
- The "none" choice is moved at the end of the list, so that it is not selected as the default unless there is really no other thread implementation available.
Quoted 5 lines
- We make NPTL the default thread implementation.
- On architectures where NPTL is not available, the NPTL option will not be available, so
Kconfigwill automatically fallback to linuxthreads.
And to make things even more simple, why not move NPTL first, then LT, then none, and remove the default?
Thus, when NPTL is avbailable, it is used; if not, LT is used; if not, then none is used.
Regards,
Yann E. MORIN.
Quoted 45 lines
Signed-off-by Thomas Petazzoni <[email protected]>--- package/uclibc/Config.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)package/uclibc/Config.in +6
-4@@ -47,15 +47,13 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE choice prompt "Thread library implementation" + # Use NPTL when available. If not available, kconfig will + # automatically fall back to linuxthreads. default BR2_PTHREADS_NATIVE - default BR2_PTHREADS if !BR2_USE_MMU help Use this option to select the thread library implementation that should be used in your toolchain. - config BR2_PTHREADS_NONE - bool "none" - config BR2_PTHREADS bool "linuxthreads" select BR2_TOOLCHAIN_HAS_THREADS@@ -67,6 +65,10 @@ choice select BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU depends on !BR2_m68k && !BR2_microblaze + + config BR2_PTHREADS_NONE + bool "none" + endchoice config BR2_PTHREAD_DEBUGSignature · 6 lines
2.7.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 uclibc: proper thread default on m68k and Microblaze
Hello,
Quoted 2 lines · Yann E. MORIN
And to make things even more simple, why not move NPTL first, then LT, then none, and remove the default?
Correct, I've changed the patch with this idea and applied. Thanks for the suggestion!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH 1/1 uclibc: proper thread default on m68k and Microblaze
In reply to Thomas PetazzoniHello,
Quoted 14 lines · Thomas Petazzoni
Traditionally, Buildroot has a default of enabling thread support. However, with the current construct of the thread choice in the uclibc package, the m68k and microblaze architecture end up with no thread support as the default.
In order to avoid having to explicit a more complicated "default" value for the choice, we take a simple approach:
- The "none" choice is moved at the end of the list, so that it is not selected as the default unless there is really no other thread implementation available.
- We make NPTL the default thread implementation.
Quoted 8 lines
- On architectures where NPTL is not available, the NPTL option will not be available, so
Kconfigwill automatically fallback to linuxthreads.Signed-off-by Thomas Petazzoni <[email protected]>--- package/uclibc/Config.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Applied to master, after taking into account Yann's comment.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com