about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-15 22:50:43 +0000
committerRoland McGrath <roland@gnu.org>2002-10-15 22:50:43 +0000
commit9b21e6bcf8986e076ca8aa4862bb76b76605e591 (patch)
tree9654d1175dfcc8eb8d7cfd9dc8958b207d988e4f /configure
parent146a03db8950595fe7ce64e4c9c397746d92d4b9 (diff)
downloadglibc-9b21e6bcf8986e076ca8aa4862bb76b76605e591.tar.gz
glibc-9b21e6bcf8986e076ca8aa4862bb76b76605e591.tar.xz
glibc-9b21e6bcf8986e076ca8aa4862bb76b76605e591.zip
2002-10-16 Jakub Jelinek <jakub@redhat.com>
	* include/libc-symbols.h (attribute_tls_model_ie): Define.
	* include/errno.h (errno): Define to __libc_errno in libc.so.
	Add attribute_tls_model_ie.
	* include/netdb.h (h_errno): Define to __libc_h_errno in libc.so.
	Add attribute_tls_model_ie.
	* include/resolv.h (_res): Define to __libc_res in libc.so.  Add
	attribute_tls_model_ie.
	* inet/herrno.c (__libc_h_errno): Add hidden alias to h_errno.
	(h_errno): Define.
	* resolv/res_libc.c (__libc_res): Add hidden alias to _res.
	(_res): Define.
	* sysdeps/generic/bits/libc-tsd.h (__libc_tsd_define): Add
	attribute_tls_model_ie.
	* sysdeps/generic/errno-loc.c (errno): Only undefine if not using
	__thread.
	* sysdeps/generic/errno.c (__libc_errno): Add hidden alias to errno.
	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use
	__libc_errno in USE___THREAD case.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
	Likewise.
	* configure.in (HAVE_TLS_MODEL_ATTRIBUTE): Check for
	__attribute__((tls_model (""))).
	* configure: Rebuilt.
	* config.h.in (HAVE_TLS_MODEL_ATTRIBUTE): Add.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure b/configure
index 66b2662117..71c12d8eb8 100755
--- a/configure
+++ b/configure
@@ -3772,6 +3772,31 @@ EOF
 
 fi
 
+if test "$libc_cv_gcc___thread" = yes; then
+    echo $ac_n "checking for tls_model attribute""... $ac_c" 1>&6
+echo "configure:3778: checking for tls_model attribute" >&5
+if eval "test \"`echo '$''{'libc_cv_gcc_tls_model_attr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    cat > conftest.c <<\EOF
+extern __thread int a __attribute__((tls_model ("initial-exec")));
+EOF
+  if { ac_try='${CC-cc} $CFLAGS -S -Werror conftest.c >&5'; { (eval echo configure:3785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    libc_cv_gcc_tls_model_attr=yes
+  else
+    libc_cv_gcc_tls_model_attr=no
+  fi
+  rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_gcc_tls_model_attr" 1>&6
+  if test "$libc_cv_gcc_tls_model_attr" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_TLS_MODEL_ATTRIBUTE 1
+EOF
+
+  fi
+fi
 
 echo $ac_n "checking for libgd""... $ac_c" 1>&6
 echo "configure:3778: checking for libgd" >&5