Hi,

it would be nice if uclinux targets are allowed to enable posix threads.
Together with uClibc-ng/uClibc you can build m68k-nommu toolchain and enable
old Linuxthreads instead of NPTL/TLS. With following change it is possible to 
build
boost, which checks if gcc is build with threads enabled.

Tested with a simple boost application on qemu-system-m68k emulating a coldfire
board without MMU. Other noMMU targets as cortex-m3/cortex-m4 will benefit from
this change, too.

The patch is used in Buildroot for a while without causing issues.

2016-12-02  Waldemar Brodkorb <w...@openadk.org>

       gcc/
       * gcc/config.gcc: Enable posix threads.

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 98267d8..6a95009 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -831,6 +831,9 @@ case ${target} in
 *-*-uclinux*)
   extra_options="$extra_options gnu-user.opt"
   use_gcc_stdint=wrap
+  case ${enable_threads} in
+    "" | yes | posix) thread_file='posix' ;;
+  esac
   tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
   ;;
 *-*-rdos*)

Reply via email to