From 9eaad202f1579630598c160952da4b29e56d5bdb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 13 Dec 2010 17:27:44 +0100 Subject: toolchain: rework thread options The selection of linuxthreads, linuxthreads old or NPTL doesn't make a lot of sense for external toolchains. So, instead, we : * Introduce an hidden BR2_TOOLCHAIN_HAS_THREADS option, which must be selected by toolchain specific options when thread support is available. Package needing to test thread support should use this option. * Move the none/linuxthreads/linuxthreads old/NPTL selection to Buildroot internal toolchain configuration. * Add an option in external toolchain to tell if thread support is available or not in the external toolchain. We assume that glibc without threads is not possible, as Ulrich Drepper said in http://sourceware.org/ml/libc-alpha/2005-08/msg00091.html ffmpeg, dmalloc and openvpn are fixed to use the new BR2_TOOLCHAIN_HAS_THREADS option. For openvpn, --enable-threads=posix is no longer used, as the configure script doesn't even understand this option. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- toolchain/toolchain-buildroot/Config.in.2 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'toolchain/toolchain-buildroot') diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2 index f1b0a7c58..fe93e70d5 100644 --- a/toolchain/toolchain-buildroot/Config.in.2 +++ b/toolchain/toolchain-buildroot/Config.in.2 @@ -76,6 +76,33 @@ config BR2_TOOLCHAIN_BUILDROOT_USE_SSP See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt for details. +choice + prompt "Thread library implementation" + default BR2_PTHREADS_OLD + help + Use this option to select the thread library implementation + that should be used in your toolchain. Not all thread + variants work with all versions of uClibc, the "linuxthreads + (stable/old)" may be a working fallback if you need + threading at all. + + config BR2_PTHREADS_NONE + bool "none" + + config BR2_PTHREADS + bool "linuxthreads" + select BR2_TOOLCHAIN_HAS_THREADS + + config BR2_PTHREADS_OLD + bool "linuxthreads (stable/old)" + select BR2_TOOLCHAIN_HAS_THREADS + + config BR2_PTHREADS_NATIVE + bool "Native POSIX Threading (NPTL)" + select BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_UCLIBC_VERSION_SNAPSHOT +endchoice + source "toolchain/elf2flt/Config.in" source "toolchain/mklibs/Config.in" source "toolchain/sstrip/Config.in" -- cgit v1.2.3