Browse Source

Simplify kconfig wording of thread support

Use a choice for thread support selection.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Bernhard Reutner-Fischer 15 years ago
parent
commit
e073021fda
1 changed files with 47 additions and 46 deletions
  1. 47 46
      extra/Configs/Config.in

+ 47 - 46
extra/Configs/Config.in

@@ -383,69 +383,41 @@ config LDSO_GNU_HASH_SUPPORT
 
 
 	  If you want to use this new feature, answer Y
 	  If you want to use this new feature, answer Y
 
 
-config HAS_NO_THREADS
+choice
-	bool
+	prompt "Thread support"
-	default n
+	#default UCLIBC_HAS_THREADS_NATIVE if (TARGET_alpha || TARGET_arm || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_sh || TARGET_sh64)
-
+	default HAS_NO_THREADS
-config UCLIBC_HAS_THREADS
-	bool "POSIX Threading support"
-	depends on !HAS_NO_THREADS
-	default y
-	# linuxthreads and linuxthreads.old need nanosleep()
-	select UCLIBC_HAS_REALTIME
 	help
 	help
 	  If you want to compile uClibc with pthread support, then answer Y.
 	  If you want to compile uClibc with pthread support, then answer Y.
 	  This will increase the size of uClibc by adding a bunch of locking
 	  This will increase the size of uClibc by adding a bunch of locking
 	  to critical data structures, and adding extra code to ensure that
 	  to critical data structures, and adding extra code to ensure that
 	  functions are properly reentrant.
 	  functions are properly reentrant.
 
 
-	  If your applications require pthreads, answer Y.
+config HAS_NO_THREADS
-
+	bool "none"
-config UCLIBC_HAS_TLS
-	bool "Thread-Local Storage"
-	depends on UCLIBC_HAS_THREADS_NATIVE
-	default n
-	help
-	  If you want to enable TLS support then answer Y.
-	  This is fast an efficient way to store per-thread local data
-	  which is not on stack. It needs __thread support enabled in
-	  gcc.
-
-config PTHREADS_DEBUG_SUPPORT
-	bool "Build pthreads debugging support"
-	default n
-	depends on UCLIBC_HAS_THREADS
 	help
 	help
-	  Say Y here if you wish to be able to debug applications that use
+	  Disable thread support.
-	  uClibc's pthreads library.  By enabling this option, a library
-	  named libthread_db will be built.  This library will be dlopen()'d
-	  by gdb and will allow gdb to debug the threads in your application.
-
-	  IMPORTANT NOTE!  Because gdb must dlopen() the libthread_db library,
-	  you must compile gdb with uClibc in order for pthread debugging to
-	  work properly.
-
-	  If you are doing development and want to debug applications using
-	  uClibc's pthread library, answer Y.  Otherwise, answer N.
 
 
 config LINUXTHREADS_OLD
 config LINUXTHREADS_OLD
-	bool "Use the older (stable) version of linuxthreads"
+	bool "older (stable) version of linuxthreads"
-	default y
+	# linuxthreads and linuxthreads.old need nanosleep()
-	depends on UCLIBC_HAS_THREADS
+	select UCLIBC_HAS_REALTIME
 	help
 	help
 	  There are two versions of linuxthreads.  The older (stable) version
 	  There are two versions of linuxthreads.  The older (stable) version
 	  has been in uClibc for quite a long time but hasn't seen too many
 	  has been in uClibc for quite a long time but hasn't seen too many
 	  updates other than bugfixes.
 	  updates other than bugfixes.
 
 
+
+config LINUXTHREADS_NEW
+	bool "slightly newer version of linuxthreads"
+	help
 	  The new version has not been tested much, and lacks ports for arches
 	  The new version has not been tested much, and lacks ports for arches
 	  which glibc does not support (like bfin/frv/etc...), but is based on
 	  which glibc does not support (like bfin/frv/etc...), but is based on
 	  the latest code from glibc, so it may be the only choice for the
 	  the latest code from glibc, so it may be the only choice for the
 	  newer ports (like alpha/amd64/64bit arches and hppa).
 	  newer ports (like alpha/amd64/64bit arches and hppa).
 
 
 config UCLIBC_HAS_THREADS_NATIVE
 config UCLIBC_HAS_THREADS_NATIVE
-	bool "Native POSIX Threading (NPTL) Support"
+	bool "Native POSIX Threading (NPTL)"
-	depends on UCLIBC_HAS_THREADS
-	default n
 	select UCLIBC_HAS_TLS
 	select UCLIBC_HAS_TLS
 	help
 	help
 	  If you want to compile uClibc with NPTL support, then answer Y.
 	  If you want to compile uClibc with NPTL support, then answer Y.
@@ -464,9 +436,38 @@ config UCLIBC_HAS_THREADS_NATIVE
 	  that way until further notice at which point this notice will
 	  that way until further notice at which point this notice will
 	  disappear. Thank you for your support and for not smoking.
 	  disappear. Thank you for your support and for not smoking.
 
 
-config LINUXTHREADS_NEW
+endchoice
-	def_bool y
+
-	depends on UCLIBC_HAS_THREADS && !LINUXTHREADS_OLD && !UCLIBC_HAS_THREADS_NATIVE
+config UCLIBC_HAS_THREADS
+	def_bool y if !HAS_NO_THREADS
+
+config UCLIBC_HAS_TLS
+	bool "Thread-Local Storage"
+	depends on UCLIBC_HAS_THREADS_NATIVE
+	default n
+	help
+	  If you want to enable TLS support then answer Y.
+	  This is fast an efficient way to store per-thread local data
+	  which is not on stack. It needs __thread support enabled in
+	  gcc.
+
+config PTHREADS_DEBUG_SUPPORT
+	bool "Build pthreads debugging support"
+	default n
+	depends on UCLIBC_HAS_THREADS
+	help
+	  Say Y here if you wish to be able to debug applications that use
+	  uClibc's pthreads library.  By enabling this option, a library
+	  named libthread_db will be built.  This library will be dlopen()'d
+	  by gdb and will allow gdb to debug the threads in your application.
+
+	  IMPORTANT NOTE!  Because gdb must dlopen() the libthread_db library,
+	  you must compile gdb with uClibc in order for pthread debugging to
+	  work properly.
+
+	  If you are doing development and want to debug applications using
+	  uClibc's pthread library, answer Y.  Otherwise, answer N.
+
 
 
 config UCLIBC_HAS_SYSLOG
 config UCLIBC_HAS_SYSLOG
 	bool "Syslog support"
 	bool "Syslog support"