diff options
author | Jason Evans <jasone@canonware.com> | 2012-03-23 23:17:43 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2012-03-23 23:17:43 (GMT) |
commit | b80581d30928e04b3d12b1fec2b989da44a07e2c (patch) | |
tree | 71bbb25d0db04cc7845df4fb24940c762bd2b09f | |
parent | 9022bf9bfd6ab907e5b019fed09fdc3acdf1c280 (diff) | |
download | jemalloc-b80581d30928e04b3d12b1fec2b989da44a07e2c.zip jemalloc-b80581d30928e04b3d12b1fec2b989da44a07e2c.tar.gz jemalloc-b80581d30928e04b3d12b1fec2b989da44a07e2c.tar.bz2 |
Forcibly disable TLS on OS X.
Forcibly disable TLS on OS X. gcc and llvm-gcc on OS X do not support
TLS, but clang does. Unfortunately, the implementation calls malloc()
internally during TLS initialization, which causes an unresolvable
bootstrapping issue.
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e1a399b..7e4f221 100644 --- a/configure.ac +++ b/configure.ac @@ -214,6 +214,7 @@ case "${host}" in RPATH="" LD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES" so="dylib" + force_tls="0" ;; *-*-freebsd*) CFLAGS="$CFLAGS" @@ -767,7 +768,6 @@ dnl Check whether the BSD-specific _malloc_thread_cleanup() exists. If so, use dnl it rather than pthreads TSD cleanup functions to support cleanup during dnl thread exit, in order to avoid pthreads library recursion during dnl bootstrapping. -force_tls="0" AC_CHECK_FUNC([_malloc_thread_cleanup], [have__malloc_thread_cleanup="1"], [have__malloc_thread_cleanup="0"] @@ -813,6 +813,10 @@ if test "x${enable_tls}" = "x0" -a "x${force_tls}" = "x1" ; then AC_MSG_RESULT([Forcing TLS to avoid allocator/threading bootstrap issues]) enable_tls="1" fi +if test "x${enable_tls}" = "x1" -a "x${force_tls}" = "x0" ; then + AC_MSG_RESULT([Forcing no TLS to avoid allocator/threading bootstrap issues]) + enable_tls="0" +fi if test "x${enable_tls}" = "x1" ; then AC_MSG_CHECKING([for TLS]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |