All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL
@ 2014-02-18 21:08 Thomas Petazzoni
  2014-02-18 21:08 ` [Buildroot] [PATCH v2 1/6] toolchain: introduce a " Thomas Petazzoni
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:08 UTC (permalink / raw)
  To: buildroot

Hello,

This is v2 of the NPTL patch series. Changes since v1:

 * Made the comment string "NPTL" instead of "NPTL threads", as
   suggested by Thomas De Schampheleire.

 * Rebased on top of the next branch.

Original cover letter:

We have a growing number of packages that need pthread functions only
available when the NPTL implementation is used. But at the same time,
we have several architectures (AVR32, ARC, Blackfin and Xtensa) that
don't support NPTL.

This set of commits adds a new hidden toolchain config knob named
BR2_TOOLCHAIN_HAS_THREADS_NPTL, and uses it in four packages: three
were already having special conditions to more-or-less detect the
availability of NPTL, and one package (qt5) which fixes an autobuilder
failure.

Thomas

Thomas Petazzoni (6):
  toolchain: introduce a toolchain knob for NPTL
  docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL
  rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  sconeserver: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  tvheadend: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  qt5: needs NPTL threads

 docs/manual/adding-packages-directory.txt |  7 ++++++-
 package/qt5/Config.in                     |  6 +++---
 package/rt-tests/Config.in                | 12 +++---------
 package/sconeserver/Config.in             | 12 +++---------
 package/tvheadend/Config.in               | 12 +++---------
 package/uclibc/Config.in                  |  1 +
 toolchain/Config.in                       |  2 ++
 toolchain/helpers.mk                      |  1 +
 toolchain/toolchain-common.in             |  3 +++
 toolchain/toolchain-external/Config.in    | 11 +++++++++++
 10 files changed, 36 insertions(+), 31 deletions(-)

-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 1/6] toolchain: introduce a toolchain knob for NPTL
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
@ 2014-02-18 21:08 ` Thomas Petazzoni
  2014-02-19 17:22   ` Arnout Vandecappelle
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 2/6] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL Thomas Petazzoni
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:08 UTC (permalink / raw)
  To: buildroot

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
+	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
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 2/6] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL
  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-18 21:09 ` 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
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:09 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 docs/manual/adding-packages-directory.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 40af809..3dc5395 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -235,7 +235,12 @@ use in the comment.
 
 * thread support
 ** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS+
-** Comment string: +threads+
+** Comment string: +threads+ (unless +BR2_TOOLCHAIN_HAS_THREADS_NPTL+
+   is also needed, in which case, specifying only +NPTL+ is sufficient)
+
+* NPTL thread support
+** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS_NPTL+
+** Comment string: +NPTL+
 
 * RPC support
 ** Dependency symbol: +BR2_TOOLCHAIN_HAS_NATIVE_RPC+
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 3/6] rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  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-18 21:09 ` [Buildroot] [PATCH v2 2/6] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL Thomas Petazzoni
@ 2014-02-18 21:09 ` Thomas Petazzoni
  2014-02-19 17:43   ` Arnout Vandecappelle
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 4/6] sconeserver: " Thomas Petazzoni
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:09 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/rt-tests/Config.in | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in
index 58a88a8..461e6de 100644
--- a/package/rt-tests/Config.in
+++ b/package/rt-tests/Config.in
@@ -1,10 +1,6 @@
 config BR2_PACKAGE_RT_TESTS
 	bool "rt-tests"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# priority-inheritance mutex needs NPTL
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	# no NPTL for these archs
-	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	help
 	  Set of utilities for testing the real-time behaviour of a
 	  Linux system.
@@ -23,7 +19,5 @@ config BR2_PACKAGE_RT_TESTS
 
 	  http://rt.wiki.kernel.org
 
-comment "rt-tests needs a toolchain w/ threads"
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "rt-tests needs a toolchain w/ NPTL"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 4/6] sconeserver: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 3/6] rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL Thomas Petazzoni
@ 2014-02-18 21:09 ` Thomas Petazzoni
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 5/6] tvheadend: " Thomas Petazzoni
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:09 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/sconeserver/Config.in | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in
index ccb9c00..76c3d91 100644
--- a/package/sconeserver/Config.in
+++ b/package/sconeserver/Config.in
@@ -1,11 +1,7 @@
 menuconfig BR2_PACKAGE_SCONESERVER
 	bool "sconeserver"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# pthread_setschedprio needs NPTL
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	# no NPTL for these archs
-	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	select BR2_PACKAGE_PCRE
 	help
 	  Sconeserver is a modular, object-orientated and extremely versatile
@@ -102,7 +98,5 @@ comment "ui module requires X.org"
 
 endif # BR2_PACKAGE_SCONESERVER
 
-comment "sconeserver needs a toolchain w/ C++, threads"
-	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
+comment "sconeserver needs a toolchain w/ C++, NPTL"
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS_NPTL)
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 5/6] tvheadend: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 4/6] sconeserver: " Thomas Petazzoni
@ 2014-02-18 21:09 ` Thomas Petazzoni
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 6/6] qt5: needs NPTL threads Thomas Petazzoni
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:09 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/tvheadend/Config.in | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in
index da60f83..74df825 100644
--- a/package/tvheadend/Config.in
+++ b/package/tvheadend/Config.in
@@ -1,22 +1,16 @@
-comment "tvheadend needs a toolchain w/ largefile, IPv6, threads"
-	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	depends on !BR2_LARGEFILE || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
+comment "tvheadend needs a toolchain w/ largefile, IPv6, NPTL"
+	depends on !BR2_LARGEFILE || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
 
 config BR2_PACKAGE_TVHEADEND
 	bool "tvheadend"
 	depends on BR2_LARGEFILE && BR2_INET_IPV6
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	# tvheadend requires an atomic_add operation. Either you have
 	# a gcc >= 4.3 toolchain and it uses the gcc intrinsics, or it
 	# has special code for x86, x86-64, PPC and ARM. So in the
 	# context of Buildroot, the only really problematic
 	# architecture is avr32, which uses gcc 4.2.
 	depends on !BR2_avr32
-	# clock_nanosleep needs NPTL
-	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
-	# no NPTL for these archs
-	depends on !BR2_xtensa && !BR2_arc
 	select BR2_PACKAGE_DVB_APPS
 	select BR2_PACKAGE_OPENSSL
 	help
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 6/6] qt5: needs NPTL threads
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 5/6] tvheadend: " Thomas Petazzoni
@ 2014-02-18 21:09 ` Thomas Petazzoni
  2014-02-19 17:45 ` [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Arnout Vandecappelle
  2014-02-22 22:42 ` Peter Korsgaard
  7 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 21:09 UTC (permalink / raw)
  To: buildroot

Fixes:

  http://autobuild.buildroot.org/results/70b/70b77e7a5b292e3fcbcf8cab4651c48220f2bd17/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/qt5/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/qt5/Config.in b/package/qt5/Config.in
index b62a810..5713c41 100644
--- a/package/qt5/Config.in
+++ b/package/qt5/Config.in
@@ -6,10 +6,10 @@ config BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	depends on !(BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_fa526)
 	default y
 
-comment "Qt5 needs a toolchain w/ wchar, IPv6, threads, C++"
+comment "Qt5 needs a toolchain w/ wchar, IPv6, NPTL, C++"
 	depends on !BR2_PACKAGE_QT
 	depends on !BR2_avr32
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
 
 menuconfig BR2_PACKAGE_QT5
 	bool "Qt5"
@@ -17,7 +17,7 @@ menuconfig BR2_PACKAGE_QT5
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on !BR2_PACKAGE_QT
 	help
 	  This option enables the Qt5 framework. Sub-options allow to
-- 
1.8.3.2

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

* [Buildroot] [PATCH v2 2/6] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL
  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
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-02-18 22:36 UTC (permalink / raw)
  To: buildroot

Thomas, all,

On Tue, Feb 18, 2014 at 10:09 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Samuel Martin <s.martin49@gmail.com>

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH v2 1/6] toolchain: introduce a toolchain knob for NPTL
  2014-02-18 21:08 ` [Buildroot] [PATCH v2 1/6] toolchain: introduce a " Thomas Petazzoni
@ 2014-02-19 17:22   ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-02-19 17:22 UTC (permalink / raw)
  To: buildroot

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

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

* [Buildroot] [PATCH v2 3/6] rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
  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
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-02-19 17:43 UTC (permalink / raw)
  To: buildroot

On 18/02/14 22:09, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

> ---
>  package/rt-tests/Config.in | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in
> index 58a88a8..461e6de 100644
> --- a/package/rt-tests/Config.in
> +++ b/package/rt-tests/Config.in
> @@ -1,10 +1,6 @@
>  config BR2_PACKAGE_RT_TESTS
>  	bool "rt-tests"
> -	depends on BR2_TOOLCHAIN_HAS_THREADS
> -	# priority-inheritance mutex needs NPTL
> -	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
> -	# no NPTL for these archs
> -	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  	help
>  	  Set of utilities for testing the real-time behaviour of a
>  	  Linux system.
> @@ -23,7 +19,5 @@ config BR2_PACKAGE_RT_TESTS
>  
>  	  http://rt.wiki.kernel.org
>  
> -comment "rt-tests needs a toolchain w/ threads"
> -	depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD
> -	depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc
> -	depends on !BR2_TOOLCHAIN_HAS_THREADS
> +comment "rt-tests needs a toolchain w/ NPTL"
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
> 

 Side-track: we normally only display comments in the case that the user
can do something about it by changing the config options. So here, the
comment should also depend on !BR2_bfin && !BR2_xtensa && ...

 But this is true for all the things that depend on (e)glibc as well...

 So the situation we have now is that on e.g. blackfin, there are a lot
of packages that are hidden without comment, but also a lot that say that
(e)glibc is required.

 To fix, we'd need a symbol like BR2_TOOLCHAIN_THREADS_NPTL_AVAILABLE
(and similar for (e)glibc) to indicate if the architecture supports this
feature to begin with.

 Hm, maybe this is not a side-track after all... Could something like
that be part of this patch set? The same can be done later for (e)glibc
as well.

 And another side-track within the side-track: I noticed while checking
the comments for blackfin that I don't see any comments regarding
!STATIC. That is because even on blackfin, BR2_PREFER_STATIC is an
option... Thomas, you have that patch set to make three options for
static vs. dynamic, so that patch set probably solves that issue as well,
right? It would be good if you could extract the part that fixes the
issue (i.e. adds something like _HAVE_DYNAMIC) and submit that on the
short term.

 Regards,
 Arnout

-- 
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

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

* [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2014-02-18 21:09 ` [Buildroot] [PATCH v2 6/6] qt5: needs NPTL threads Thomas Petazzoni
@ 2014-02-19 17:45 ` Arnout Vandecappelle
  2014-02-19 20:40   ` Thomas Petazzoni
  2014-02-22 22:42 ` Peter Korsgaard
  7 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-02-19 17:45 UTC (permalink / raw)
  To: buildroot

On 18/02/14 22:08, Thomas Petazzoni wrote:
> Hello,
> 
> This is v2 of the NPTL patch series. Changes since v1:
> 
>  * Made the comment string "NPTL" instead of "NPTL threads", as
>    suggested by Thomas De Schampheleire.
> 
>  * Rebased on top of the next branch.
> 
> Original cover letter:
> 
> We have a growing number of packages that need pthread functions only
> available when the NPTL implementation is used. But at the same time,
> we have several architectures (AVR32, ARC, Blackfin and Xtensa) that
> don't support NPTL.
> 
> This set of commits adds a new hidden toolchain config knob named
> BR2_TOOLCHAIN_HAS_THREADS_NPTL, and uses it in four packages: three
> were already having special conditions to more-or-less detect the
> availability of NPTL, and one package (qt5) which fixes an autobuilder
> failure.

 You're missing a patch to docs/manual/adding-packages-directory.txt to
standardize the comment.

 Regards,
 Arnout
-- 
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

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

* [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-02-19 20:40 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Wed, 19 Feb 2014 18:45:36 +0100, Arnout Vandecappelle wrote:

> > We have a growing number of packages that need pthread functions only
> > available when the NPTL implementation is used. But at the same time,
> > we have several architectures (AVR32, ARC, Blackfin and Xtensa) that
> > don't support NPTL.
> > 
> > This set of commits adds a new hidden toolchain config knob named
> > BR2_TOOLCHAIN_HAS_THREADS_NPTL, and uses it in four packages: three
> > were already having special conditions to more-or-less detect the
> > availability of NPTL, and one package (qt5) which fixes an autobuilder
> > failure.
> 
>  You're missing a patch to docs/manual/adding-packages-directory.txt to
> standardize the comment.

Did you miss PATCH 2/6 ?

Thanks for the review!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL
  2014-02-19 20:40   ` Thomas Petazzoni
@ 2014-02-19 21:33     ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-02-19 21:33 UTC (permalink / raw)
  To: buildroot

On 19/02/14 21:40, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle,
> 
> On Wed, 19 Feb 2014 18:45:36 +0100, Arnout Vandecappelle wrote:
> 
>>> We have a growing number of packages that need pthread functions only
>>> available when the NPTL implementation is used. But at the same time,
>>> we have several architectures (AVR32, ARC, Blackfin and Xtensa) that
>>> don't support NPTL.
>>>
>>> This set of commits adds a new hidden toolchain config knob named
>>> BR2_TOOLCHAIN_HAS_THREADS_NPTL, and uses it in four packages: three
>>> were already having special conditions to more-or-less detect the
>>> availability of NPTL, and one package (qt5) which fixes an autobuilder
>>> failure.
>>
>>  You're missing a patch to docs/manual/adding-packages-directory.txt to
>> standardize the comment.
> 
> Did you miss PATCH 2/6 ?

 What is it with this patch set, I keep missing things :-)

 Sorry for the bother.

 Regards,
 Arnout

> 
> Thanks for the review!
> 
> Thomas
> 


-- 
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

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

* [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL
  2014-02-18 21:08 [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2014-02-19 17:45 ` [Buildroot] [PATCH v2 0/6] Add toolchain knob for NPTL Arnout Vandecappelle
@ 2014-02-22 22:42 ` Peter Korsgaard
  7 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-02-22 22:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > This is v2 of the NPTL patch series. Changes since v1:

 >  * Made the comment string "NPTL" instead of "NPTL threads", as
 >    suggested by Thomas De Schampheleire.

 >  * Rebased on top of the next branch.

 > Original cover letter:

 > We have a growing number of packages that need pthread functions only
 > available when the NPTL implementation is used. But at the same time,
 > we have several architectures (AVR32, ARC, Blackfin and Xtensa) that
 > don't support NPTL.

 > This set of commits adds a new hidden toolchain config knob named
 > BR2_TOOLCHAIN_HAS_THREADS_NPTL, and uses it in four packages: three
 > were already having special conditions to more-or-less detect the
 > availability of NPTL, and one package (qt5) which fixes an autobuilder
 > failure.

 > Thomas

 > Thomas Petazzoni (6):
 >   toolchain: introduce a toolchain knob for NPTL
 >   docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL
 >   rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
 >   sconeserver: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
 >   tvheadend: use BR2_TOOLCHAIN_HAS_THREADS_NPTL
 >   qt5: needs NPTL threads

Committed series to next with the minor tweak Arnout suggested for patch
1, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2014-02-22 22:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.