diff options
author | Jason Evans <jasone@canonware.com> | 2012-04-04 05:30:05 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2012-04-04 05:30:05 (GMT) |
commit | 3cc1f1aa6981d6647aa01cec725fb2c134c1b0e9 (patch) | |
tree | 245d6e7f8502ee36e6d0d27cea60923fcdc720fb /configure.ac | |
parent | 01b3fe55ff3ac8e4aa689f09fcb0729da8037638 (diff) | |
download | jemalloc-3cc1f1aa6981d6647aa01cec725fb2c134c1b0e9.zip jemalloc-3cc1f1aa6981d6647aa01cec725fb2c134c1b0e9.tar.gz jemalloc-3cc1f1aa6981d6647aa01cec725fb2c134c1b0e9.tar.bz2 |
Add tls_model configuration.
The tls_model attribute isn't supporte by clang (yet?), so add a
configure test that defines JEMALLOC_TLS_MODEL appropriately.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index c1b46dc..e704d2d 100644 --- a/configure.ac +++ b/configure.ac @@ -285,6 +285,21 @@ if test "x${je_cv_attribute}" = "xyes" ; then JE_CFLAGS_APPEND([-fvisibility=hidden]) fi fi +dnl Check for tls_model attribute support (clang 3.0 still lacks support). +SAVED_CFLAGS="${CFLAGS}" +JE_CFLAGS_APPEND([-Werror]) +JE_COMPILABLE([tls_model attribute], [], + [static __thread int + __attribute__((tls_model("initial-exec"))) foo; + foo = 0;], + [je_cv_tls_model]) +CFLAGS="${SAVED_CFLAGS}" +if test "x${je_cv_tls_model}" = "xyes" ; then + AC_DEFINE([JEMALLOC_TLS_MODEL], + [__attribute__((tls_model("initial-exec")))]) +else + AC_DEFINE([JEMALLOC_TLS_MODEL], [ ]) +fi JE_COMPILABLE([mremap(...MREMAP_FIXED...)], [ #define _GNU_SOURCE @@ -719,7 +734,7 @@ AC_CACHE_CHECK([STATIC_PAGE_SHIFT], return 1; } fprintf(f, "%u\n", ffs((int)result) - 1); - close(f); + fclose(f); return 0; ]])], |