summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-17 22:06:48 +0000
committerRoland McGrath <roland@gnu.org>2002-10-17 22:06:48 +0000
commit5b8f26b4cd59fd66b99ba32275c179a22adb757c (patch)
treed82afa6f69cd957c71ffb49d385f3134192c53cc /configure.in
parent0420d8885a4889dca3b874c934fd5f42f2e99e5f (diff)
downloadglibc-5b8f26b4cd59fd66b99ba32275c179a22adb757c.tar.gz
2002-10-17 Roland McGrath <roland@redhat.com>
* configure.in: Grok --without-__thread and disable HAVE___THREAD. * configure: Regenerated.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 18 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index 89830313a1..5ed4faa1f7 100644
--- a/configure.in
+++ b/configure.in
@@ -145,6 +145,10 @@ AC_ARG_WITH(tls, dnl
[ --with-tls enable support for TLS],
usetls=$withval, usetls=no)
+AC_ARG_WITH(__thread, dnl
+[ --without-__thread do not use TLS features even when supporting them],
+ use__thread=$withval, use__thread=yes)
+
AC_ARG_ENABLE(hidden-plt, dnl
[ --disable-hidden-plt do not hide internal function calls to avoid PLT],
hidden=$enableval, hidden=yes)
@@ -1610,19 +1614,23 @@ if test "$libc_cv_gcc_subtract_local_labels" = yes; then
fi
dnl Check whether the compiler supports the __thread keyword.
-AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
-[cat > conftest.c <<\EOF
-__thread int a = 42;
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AC_FD_CC]); then
- libc_cv_gcc___thread=yes
+if test "x$use__thread" != xno; then
+ AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
+ [cat > conftest.c <<\EOF
+ __thread int a = 42;
+ EOF
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AC_FD_CC]); then
+ libc_cv_gcc___thread=yes
+ else
+ libc_cv_gcc___thread=no
+ fi
+ rm -f conftest*])
+ if test "$libc_cv_gcc___thread" = yes; then
+ AC_DEFINE(HAVE___THREAD)
+ fi
else
libc_cv_gcc___thread=no
fi
-rm -f conftest*])
-if test "$libc_cv_gcc___thread" = yes; then
- AC_DEFINE(HAVE___THREAD)
-fi
if test "$libc_cv_gcc___thread" = yes; then
dnl Check whether the compiler supports the tls_model attribute.