summaryrefslogtreecommitdiff
path: root/libgomp/configure
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-25 20:58:25 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-25 20:58:25 +0000
commit4d006f8aedf1fe49c0a0652bca263fe789db5d69 (patch)
tree1c60995ec3ab114dfb5e5c1677f11326d343c170 /libgomp/configure
parent083659692e38253d70e2c465e2c896460df2b43e (diff)
downloadgcc-4d006f8aedf1fe49c0a0652bca263fe789db5d69.tar.gz
PR libgomp/25865
* configure.ac: Use GCC_CHECK_TLS. * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove. * Makefile.in, aclocal.m4, configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-xlibgomp/configure80
1 files changed, 65 insertions, 15 deletions
diff --git a/libgomp/configure b/libgomp/configure
index 2d9482677f2..5d906f65131 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -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