toolchain: introduce a toolchain knob for NPTL
As our architecture support expands to a number of architectures that do not implement NPTL threading, and the number of packages that depend on NPTL specific features, it has become necessary to be able to know whether the toolchain has NPTL support or not. This commit adds a new BR2_TOOLCHAIN_HAS_THREADS_NPTL hidden Config.in option that allows packages to know whether NPTL is available or not. This hidden option is: * Automatically enabled when glibc/eglibc or musl toolchains are used, either internal or external. * Automatically enabled when an internal uClibc toolchain with NPTL support is configured. It is left disabled otherwise for internal uClibc toolchains. * Configured according to a visible Config.in option for custom external uClibc toolchains. [Peter: factor _EXTERNAL_HAS_THREADS in single if as suggested by Arnout] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
eda3d0e1d0
commit
c64f948d2c
@ -124,6 +124,7 @@ choice
|
|||||||
config BR2_PTHREADS_NATIVE
|
config BR2_PTHREADS_NATIVE
|
||||||
bool "Native POSIX Threading (NPTL)"
|
bool "Native POSIX Threading (NPTL)"
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS
|
select BR2_TOOLCHAIN_HAS_THREADS
|
||||||
|
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||||
depends on !BR2_arc
|
depends on !BR2_arc
|
||||||
depends on !BR2_avr32
|
depends on !BR2_avr32
|
||||||
depends on !BR2_bfin
|
depends on !BR2_bfin
|
||||||
|
@ -9,6 +9,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
|
|||||||
select BR2_ENABLE_LOCALE
|
select BR2_ENABLE_LOCALE
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS
|
select BR2_TOOLCHAIN_HAS_THREADS
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||||
|
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||||
select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
|
select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
|
||||||
select BR2_TOOLCHAIN_HAS_SSP
|
select BR2_TOOLCHAIN_HAS_SSP
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ config BR2_TOOLCHAIN_USES_MUSL
|
|||||||
select BR2_ENABLE_LOCALE
|
select BR2_ENABLE_LOCALE
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS
|
select BR2_TOOLCHAIN_HAS_THREADS
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||||
|
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Toolchain type"
|
prompt "Toolchain type"
|
||||||
|
@ -268,6 +268,7 @@ check_uclibc = \
|
|||||||
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
|
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
|
||||||
$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
|
$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
|
||||||
$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\
|
$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\
|
||||||
|
$(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support) ;\
|
||||||
$(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support)
|
$(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -29,6 +29,9 @@ config BR2_TOOLCHAIN_HAS_THREADS
|
|||||||
config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||||
|
bool
|
||||||
|
|
||||||
config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
|
config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
@ -996,9 +996,10 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
|
|||||||
support. If you don't know, leave the default value,
|
support. If you don't know, leave the default value,
|
||||||
Buildroot will tell you if it's correct or not.
|
Buildroot will tell you if it's correct or not.
|
||||||
|
|
||||||
|
if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
|
||||||
|
|
||||||
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
|
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
|
||||||
bool "Toolchain has threads debugging support?"
|
bool "Toolchain has threads debugging support?"
|
||||||
depends on BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
|
|
||||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
@ -1006,6 +1007,18 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
|
|||||||
debugging support. If you don't know, leave the default
|
debugging support. If you don't know, leave the default
|
||||||
value, Buildroot will tell you if it's correct or not.
|
value, Buildroot will tell you if it's correct or not.
|
||||||
|
|
||||||
|
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
|
||||||
|
bool "Toolchain has NPTL threads support?"
|
||||||
|
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Select this option if your external toolchain uses the NPTL
|
||||||
|
(Native Posix Thread Library) implementation of Posix
|
||||||
|
threads. If you don't know, leave the default value,
|
||||||
|
Buildroot will tell you if it's correct or not.
|
||||||
|
|
||||||
|
endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
|
||||||
|
|
||||||
config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
|
config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
|
||||||
bool "Toolchain has SSP support?"
|
bool "Toolchain has SSP support?"
|
||||||
select BR2_TOOLCHAIN_HAS_SSP
|
select BR2_TOOLCHAIN_HAS_SSP
|
||||||
|
Loading…
Reference in New Issue
Block a user