Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/6] toolchain: introduce a toolchain knob for NPTL
Date: Wed, 19 Feb 2014 18:22:07 +0100	[thread overview]
Message-ID: <5304E83F.9070207@mind.be> (raw)
In-Reply-To: <1392757744-29984-2-git-send-email-thomas.petazzoni@free-electrons.com>

On 18/02/14 22:08, Thomas Petazzoni wrote:
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/uclibc/Config.in               |  1 +
>  toolchain/Config.in                    |  2 ++
>  toolchain/helpers.mk                   |  1 +
>  toolchain/toolchain-common.in          |  3 +++
>  toolchain/toolchain-external/Config.in | 11 +++++++++++
>  5 files changed, 18 insertions(+)
> 
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index 860e410..2b93660 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -124,6 +124,7 @@ choice
>  	config BR2_PTHREADS_NATIVE
>  		bool "Native POSIX Threading (NPTL)"
>  		select BR2_TOOLCHAIN_HAS_THREADS
> +		select BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  		depends on !BR2_arc
>  		depends on !BR2_avr32
>  		depends on !BR2_bfin
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index bbfd367..44f3ac6 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -9,6 +9,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
>  	select BR2_ENABLE_LOCALE
>  	select BR2_TOOLCHAIN_HAS_THREADS
>  	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> +	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
>  	select BR2_TOOLCHAIN_HAS_SSP
>  
> @@ -23,6 +24,7 @@ config BR2_TOOLCHAIN_USES_MUSL
>  	select BR2_ENABLE_LOCALE
>  	select BR2_TOOLCHAIN_HAS_THREADS
>  	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> +	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  
>  choice
>  	prompt "Toolchain type"
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index faa9d90..892ab4b 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -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_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,__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)
>  
>  #
> diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
> index 8435a65..c4e3890 100644
> --- a/toolchain/toolchain-common.in
> +++ b/toolchain/toolchain-common.in
> @@ -29,6 +29,9 @@ config BR2_TOOLCHAIN_HAS_THREADS
>  config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
>  	bool
>  
> +config BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +	bool
> +
>  config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
>  	bool
>  
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index f02f89b..c87f195 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -1006,6 +1006,17 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
>  	  debugging support. If you don't know, leave the default
>  	  value, Buildroot will tell you if it's correct or not.
>  
> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
> +	bool "Toolchain has NPTL threads support?"
> +	depends on BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS

 Small nit: it would be nicer to factor this with the _THREADS_DEBUG
option in a single if-clause.

 Regards,
 Arnout

> +	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.
> +
>  config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
>  	bool "Toolchain has SSP support?"
>  	select BR2_TOOLCHAIN_HAS_SSP
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2014-02-19 17:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
2014-02-18 21:08 ` [Buildroot] [PATCH v2 1/6] toolchain: introduce a " Thomas Petazzoni
2014-02-19 17:22   ` Arnout Vandecappelle [this message]
2014-02-18 21:09 ` [Buildroot] [PATCH v2 2/6] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL Thomas Petazzoni
2014-02-18 22:36   ` Samuel Martin
2014-02-18 21:09 ` [Buildroot] [PATCH v2 3/6] rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL Thomas Petazzoni
2014-02-19 17:43   ` Arnout Vandecappelle
2014-02-18 21:09 ` [Buildroot] [PATCH v2 4/6] sconeserver: " Thomas Petazzoni
2014-02-18 21:09 ` [Buildroot] [PATCH v2 5/6] tvheadend: " Thomas Petazzoni
2014-02-18 21:09 ` [Buildroot] [PATCH v2 6/6] qt5: needs NPTL threads Thomas Petazzoni
2014-02-19 17:45 ` [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Arnout Vandecappelle
2014-02-19 20:40   ` Thomas Petazzoni
2014-02-19 21:33     ` Arnout Vandecappelle
2014-02-22 22:42 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5304E83F.9070207@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox