re PR libgomp/25865 (libgomp incorrectly detects support for TLS)

PR libgomp/25865
        * configure.ac: Use GCC_CHECK_TLS.
        * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
        * Makefile.in, aclocal.m4, configure: Regenerate.

From-SVN: r113256
This commit is contained in:
Richard Henderson 2006-04-25 13:58:25 -07:00 committed by Richard Henderson
parent d61772b25d
commit 60e1758f60
7 changed files with 85 additions and 36 deletions

View File

@ -1,3 +1,10 @@
2006-04-25 Richard Henderson <rth@redhat.com>
PR libgomp/25865
* configure.ac: Use GCC_CHECK_TLS.
* acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
* Makefile.in, aclocal.m4, configure: Regenerate.
2006-04-10 Matthias Klose <doko@debian.org>
* testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -15,8 +15,6 @@
@SET_MAKE@
SOURCES = $(libgomp_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -51,8 +49,10 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/stdint.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/stdint.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)

View File

@ -1,15 +1,3 @@
dnl Check whether the target supports TLS.
AC_DEFUN([LIBGOMP_CHECK_TLS], [
LIBGOMP_ENABLE(tls, yes, [Use thread-local storage])
AC_CACHE_CHECK([whether the target supports thread-local storage],
have_tls, [
AC_TRY_COMPILE([__thread int foo;],
[], have_tls=$enable_tls, have_tls=no)])
if test $have_tls = yes; then
AC_DEFINE(HAVE_TLS, 1,
[Define to 1 if the target supports thread-local storage.])
fi])
dnl ----------------------------------------------------------------------
dnl This whole bit snagged from libgfortran.

6
libgomp/aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.5])])
[AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@ -915,6 +915,8 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/stdint.m4])
m4_include([../config/tls.m4])
m4_include([acinclude.m4])

80
libgomp/configure vendored
View File

@ -8611,20 +8611,9 @@ if test "${have_tls+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
if test "$cross_compiling" = yes; then
cat >conftest.$ac_ext <<_ACEOF
__thread int foo;
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@ -8648,7 +8637,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
have_tls=$enable_tls
have_tls=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@ -8656,10 +8645,71 @@ sed 's/^/| /' conftest.$ac_ext >&5
have_tls=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
__thread int a; int b; int main() { return a = b; }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
save_LDFLAGS="$LDFLAGS"
LDFLAGS="-static $LDFLAGS"
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
__thread int a; int b; int main() { return a = b; }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
have_tls=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
have_tls=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
LDFLAGS="$save_LDFLAGS"
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
have_tls=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $have_tls" >&5
echo "${ECHO_T}$have_tls" >&6
if test $have_tls = yes; then
if test "$enable_tls $have_tls" = "yes yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_TLS 1

View File

@ -183,7 +183,7 @@ if test $ac_cv_func_clock_gettime = no; then
fi
# See if we support thread-local storage.
LIBGOMP_CHECK_TLS
GCC_CHECK_TLS
# See what sort of export controls are availible.
LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -40,8 +40,10 @@ subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/stdint.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/stdint.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)