mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-16 23:38:54 +00:00
libc/uClibc: apply the threading model to the configuration
The threading model shall be be set in the .config file. Also, offer the choice between 'old/stable' and 'new' linuxthreads.
This commit is contained in:
parent
43ca5b4095
commit
13b5487575
36
config/libc/uClibc.in.2
Normal file
36
config/libc/uClibc.in.2
Normal file
@ -0,0 +1,36 @@
|
||||
# uClibc second-part option
|
||||
|
||||
if THREADS_LINUXTHREADS
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Linuxthread implementation: "
|
||||
default LIBC_UCLIBC_LNXTHRD_OLD
|
||||
|
||||
config LIBC_UCLIBC_LNXTHRD_OLD
|
||||
bool
|
||||
prompt "old/stable"
|
||||
help
|
||||
From the uClibc config option help:
|
||||
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
|
||||
updates other than bugfixes.
|
||||
|
||||
config LIBC_UCLIBC_LNXTHRD_NEW
|
||||
bool
|
||||
prompt "new"
|
||||
help
|
||||
From the uClibc config option help:
|
||||
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
|
||||
the latest code from glibc, so it may be the only choice for the
|
||||
newer ports (like alpha/amd64/64bit arches and hppa).
|
||||
|
||||
endchoice
|
||||
|
||||
config LIBC_UCLIBC_LNXTHRD
|
||||
string
|
||||
default "old" if LIBC_UCLIBC_LNXTHRD_OLD
|
||||
default "new" if LIBC_UCLIBC_LNXTHRD_NEW
|
||||
|
||||
endif # THREADS_LINUXTHREADS
|
@ -327,6 +327,36 @@ mungeuClibcConfig() {
|
||||
ENDSED
|
||||
fi
|
||||
|
||||
# Push the threading model
|
||||
# Note: we take into account all of the .28, .29, .30 and .31
|
||||
# versions, here.
|
||||
case "${CT_THREADS}:${CT_LIBC_UCLIBC_LNXTHRD}" in
|
||||
none:*)
|
||||
cat <<-ENDSED
|
||||
s/^# HAS_NO_THREADS is not set/HAS_NO_THREADS=y/
|
||||
s/^UCLIBC_HAS_THREADS=y/# UCLIBC_HAS_THREADS is not set/
|
||||
s/^LINUXTHREADS_OLD=y/# LINUXTHREADS_OLD is not set/
|
||||
s/^LINUXTHREADS_NEW=y/# LINUXTHREADS_NEW is not set/
|
||||
ENDSED
|
||||
;;
|
||||
*:old)
|
||||
cat <<-ENDSED
|
||||
s/^HAS_NO_THREADS=y/# HAS_NO_THREADS is not set/
|
||||
s/^# UCLIBC_HAS_THREADS is not set/UCLIBC_HAS_THREADS=y/
|
||||
s/^# LINUXTHREADS_OLD is not set/# LINUXTHREADS_OLD=y/
|
||||
s/^LINUXTHREADS_NEW=y/# LINUXTHREADS_NEW is not set/
|
||||
ENDSED
|
||||
;;
|
||||
*:new)
|
||||
cat <<-ENDSED
|
||||
s/^# HAS_NO_THREADS is not set/HAS_NO_THREADS=y/
|
||||
s/^# UCLIBC_HAS_THREADS is not set/UCLIBC_HAS_THREADS=y/
|
||||
s/^LINUXTHREADS_OLD=y/# LINUXTHREADS_OLD is not set/
|
||||
s/^# LINUXTHREADS_NEW is not set/# LINUXTHREADS_NEW=y/
|
||||
ENDSED
|
||||
;;
|
||||
esac
|
||||
|
||||
# Always build the libpthread_db
|
||||
cat <<-ENDSED
|
||||
s/^# PTHREADS_DEBUG_SUPPORT is not set.*/PTHREADS_DEBUG_SUPPORT=y/
|
||||
|
Loading…
x
Reference in New Issue
Block a user