aboutsummaryrefslogtreecommitdiff
path: root/config/tls.m4
diff options
context:
space:
mode:
authorSebastian Pop <sebpop@gmail.com>2007-08-03 01:44:44 +0000
committerSebastian Pop <sebpop@gmail.com>2007-08-03 01:44:44 +0000
commit398e62347d641822e598e8fc754c3f4ed3346757 (patch)
tree693f5558c7bf741f37428ccf8515969acb2cc019 /config/tls.m4
parenta8e15c0a35c5b9d448f75685b752130d2b08a16a (diff)
* Merge from mainline (125309:127169).
* tree-loop-distribution.c: Disabled. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/graphite@127175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config/tls.m4')
-rw-r--r--config/tls.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/config/tls.m4 b/config/tls.m4
index c8f3ff0a3733..69cf6d4f9d2b 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -73,3 +73,16 @@ AC_DEFUN([GCC_CHECK_TLS], [
AC_DEFINE(HAVE_TLS, 1,
[Define to 1 if the target supports thread-local storage.])
fi])
+
+dnl Check whether the target assembler supports TLS.
+AC_DEFUN([GCC_CHECK_CC_TLS], [
+ GCC_ENABLE(tls, yes, [], [Use thread-local storage])
+ AC_CACHE_CHECK([whether the target asssembler upports thread-local storage],
+ have_cc_tls, [
+ AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }],
+ [have_cc_tls=yes], [have_cc_tls=no])]
+ )])
+ if test "$enable_tls $have_cc_tls" = "yes yes"; then
+ AC_DEFINE(HAVE_CC_TLS, 1,
+ [Define to 1 if the target assembler supports thread-local storage.])
+ fi])