summaryrefslogtreecommitdiff
path: root/config/tls.m4
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2007-07-11 19:09:22 +0000
committerH.J. Lu <hjl@lucon.org>2007-07-11 19:09:22 +0000
commit18e9f3b9551b46bbe10be598b5b844894966d5a9 (patch)
treece86a9d6b98a0f0bb81274ccf38198c0132cde9f /config/tls.m4
parentc137715692b617fb317361a1f378c79cc882ed2a (diff)
downloadbinutils-redhat-18e9f3b9551b46bbe10be598b5b844894966d5a9.tar.gz
2007-07-06 H.J. Lu <hongjiu.lu@intel.com>
* tls.m4 (GCC_CHECK_CC_TLS): New. 2007-07-05 Sebastian Pop <sebpop@gmail.com> PR bootstrap/32622 * mh-x86omitfp (BOOT_CFLAGS): Add -fomit-frame-pointer, don't reset its value.
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 c8f3ff0a37..69cf6d4f9d 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])