#TODO check cmake detection
IF(CMAKE_USE_PTHREADS_INIT)
SET(SRC ${SRC} pthread_start.c pthread_support.c pthread_stop_world.c)
- IF( HOST MATCHES x86-.*-linux.*|ia64-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha-.*-linux.*|sparc.*-.*-linux.*)
+ IF( HOST MATCHES .*-.*-.*linux.*|.*-.*-nacl.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
IF(enable_parallel_mark)
SET(SRC ${SRC} thread_local_alloc.c)
MESSAGE("Explicit GC_INIT() calls may be required.")
ENDIF()
- IF ( HOST MATCHES .*-.*-linux.*)
- ADD_DEFINITIONS("-DGC_LINUX_THREADS")
- ADD_DEFINITIONS("-D_REENTRANT")
- IF(enable_parallel_mark)
- ADD_DEFINITIONS("-DPARALLEL_MARK")
- ENDIF(enable_parallel_mark)
- ENDIF()
IF ( HOST MATCHES .*-.*-aix.*)
ADD_DEFINITIONS("-DGC_AIX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-hpux11.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-hpux10.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-freebsd.*)
- MESSAGE("FreeBSD does not yet fully support threads with Boehm GC.")
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-kfreebsd.*-gnu)
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-solaris.*)
ADD_DEFINITIONS("-DGC_SOLARIS_THREADS")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
IF ( HOST MATCHES .*-.*-cygwin.*)
ADD_DEFINITIONS("-DGC_THREADS")
ADD_DEFINITIONS("-DGC_OSF1_THREADS")
IF(enable_parallel_mark)
ADD_DEFINITIONS("-DPARALLEL_MARK")
- ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
- SET(SRC ${SRC} thread_local_alloc.c)
- MESSAGE("Explicit GC_INIT() calls may be required.")
- # May want to enable it in other cases, too.
- # Measurements haven't yet been done.
ENDIF()
- ENDIF()
- IF ( HOST MATCHES .*-.*-linux.*)
- ADD_DEFINITIONS("-DGC_LINUX_THREADS")
- ADD_DEFINITIONS("-D_REENTRANT")
- IF(enable_parallel_mark)
- ADD_DEFINITIONS("-DPARALLEL_MARK")
- ENDIF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
+ SET(SRC ${SRC} thread_local_alloc.c)
+ MESSAGE("Explicit GC_INIT() calls may be required.")
ENDIF()
ENDIF(CMAKE_USE_PTHREADS_INIT)
THREADS=posix
AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
case "$host" in
- x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* \
- | x86_64-*-linux* | alpha-*-linux* | powerpc*-*-linux* | sparc*-*-linux*)
+ *-*-*linux* | *-*-nacl*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(THREAD_LOCAL_ALLOC)
AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
;;
- *-*-*linux* | *-*-nacl*)
- AC_DEFINE(GC_LINUX_THREADS)
- AC_DEFINE(_REENTRANT)
- if test "${enable_parallel_mark}" != no; then
- AC_DEFINE(PARALLEL_MARK)
- fi
- ;;
*-*-aix*)
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-hpux11*)
AC_MSG_WARN("Only HP/UX 11 POSIX threads are supported.")
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS=-pthread
AM_CFLAGS="$AM_CFLAGS -pthread"
;;
*-*-freebsd*)
- AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
AC_DEFINE(GC_FREEBSD_THREADS)
AM_CFLAGS="$AM_CFLAGS -pthread"
if test "${enable_parallel_mark}" != no; then
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS="-lpthread -lrt"
;;
*-*-solaris*)
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-cygwin*)
AC_DEFINE(GC_WIN32_THREADS)
AC_DEFINE(GC_OSF1_THREADS)
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
- AC_DEFINE(THREAD_LOCAL_ALLOC)
- AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
+ AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
AM_CFLAGS="$AM_CFLAGS -pthread"
THREADDLLIBS="-lpthread -lrt"
;;
if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
rtems)
THREADS=posix