[commit: ghc] master: Check for __thread in ./configure.ac (f9652e2)

git at git.haskell.org git at git.haskell.org
Tue Jan 28 14:27:28 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f9652e22da592ec0689b4919c003c67dacf28d31/ghc

>---------------------------------------------------------------

commit f9652e22da592ec0689b4919c003c67dacf28d31
Author: Austin Seipp <austin at well-typed.com>
Date:   Tue Jan 28 05:44:44 2014 -0600

    Check for __thread in ./configure.ac
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

f9652e22da592ec0689b4919c003c67dacf28d31
 configure.ac |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 744cebd..cb411f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -861,7 +861,21 @@ dnl ** check for eventfd which is needed by the I/O manager
 AC_CHECK_HEADERS([sys/eventfd.h])
 AC_CHECK_FUNCS([eventfd])
 
-# checking for PAPI
+dnl ** Check for __thread support in the compiler
+AC_MSG_CHECKING(for __thread support)
+AC_COMPILE_IFELSE(
+  [ AC_LANG_SOURCE([[__thread int tester = 0;]]) ],
+  [
+   AC_MSG_RESULT(yes)
+   AC_DEFINE([CC_SUPPORTS_TLS],[0],[Define to 1 if __thread is supported])
+  ],
+  [
+   AC_MSG_RESULT(no)
+   AC_DEFINE([CC_SUPPORTS_TLS],[1],[Define to 1 if __thread is supported])
+  ])
+
+
+dnl ** checking for PAPI
 AC_CHECK_LIB(papi, PAPI_library_init, HavePapiLib=YES, HavePapiLib=NO)
 AC_CHECK_HEADER([papi.h], [HavePapiHeader=YES], [HavePapiHeader=NO])
 AC_SUBST(HavePapiLib)



More information about the ghc-commits mailing list