https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
Bug ID: 71721 Summary: uclinux posix threads Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: wbx at openadk dot org Target Milestone: --- 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. diff --git a/gcc/config.gcc b/gcc/config.gcc index 1f75f17..92df4b9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -827,6 +827,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*) 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.