summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-06-08 22:41:25 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-06-08 22:41:25 (GMT)
commit13b548757586759fb3093003d56a80efdd1eb602 (patch)
tree90ce835ff56b28fc3e46ea3094eefc9b28256a88 /scripts
parent43ca5b409558d6eea50c99384b76980ebaf5f52d (diff)
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/libc/uClibc.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index 03411a2..8d58524 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -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/