diff --git a/config/ChangeLog b/config/ChangeLog
index d1ee4bc7cb878ed72593c6a7e04014d4122f4404..84db8b2f3c09986561f50b49c0d11d359683651f 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
+
+	* tls.m4 (GCC_CHECK_TLS): Rename have_tls to gcc_cv_have_tls.
+	(GCC_CHECK_CC_TLS): Rename have_cc_tls to gcc_cv_have_cc_tls.
+
 2007-10-03  Richard Sandiford  <richard@codesourcery.com>
 
 	* no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
diff --git a/config/tls.m4 b/config/tls.m4
index 69cf6d4f9d2b6096d87c83676cb1d5f834a55582..b6c4c4a6a7da5677506dcf92f3928c9891e311b6 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -2,7 +2,7 @@ dnl Check whether the target supports TLS.
 AC_DEFUN([GCC_CHECK_TLS], [
   GCC_ENABLE(tls, yes, [], [Use thread-local storage])
   AC_CACHE_CHECK([whether the target supports thread-local storage],
-		 have_tls, [
+		 gcc_cv_have_tls, [
     AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
       [dnl If the test case passed with dynamic linking, try again with
        dnl static linking, but only if static linking is supported (not
@@ -11,10 +11,10 @@ AC_DEFUN([GCC_CHECK_TLS], [
       LDFLAGS="-static $LDFLAGS"
       AC_LINK_IFELSE([int main() { return 0; }],
 	AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
-		      [have_tls=yes], [have_tls=no],[]),
-	[have_tls=yes])
+		      [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no],[]),
+	[gcc_cv_have_tls=yes])
       LDFLAGS="$chktls_save_LDFLAGS"
-      if test $have_tls = yes; then
+      if test $gcc_cv_have_tls = yes; then
 	dnl So far, the binutils and the compiler support TLS.
 	dnl Also check whether the libc supports TLS, i.e. whether a variable
 	dnl with __thread linkage has a different address in different threads.
@@ -58,18 +58,18 @@ AC_DEFUN([GCC_CHECK_TLS], [
 		if (pthread_join (thread, &thread_retval))
 		  return 0;
 		return (a_in_other_thread == a_in_main_thread);])],
-	     [have_tls=yes], [have_tls=no], [])
+	     [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no], [])
 	  CFLAGS="$chktls_save_CFLAGS"
 	fi
       fi],
-      [have_tls=no],
+      [gcc_cv_have_tls=no],
       [dnl This is the cross-compiling case. Assume libc supports TLS if the
        dnl binutils and the compiler do.
        AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
-		      [have_tls=yes], [have_tls=no])
+		      [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no])
       ]
     )])
-  if test "$enable_tls $have_tls" = "yes yes"; then
+  if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
     AC_DEFINE(HAVE_TLS, 1,
 	      [Define to 1 if the target supports thread-local storage.])
   fi])
@@ -78,11 +78,11 @@ 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, [
+		 gcc_cv_have_cc_tls, [
     AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }],
-      [have_cc_tls=yes], [have_cc_tls=no])]
+      [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])]
     )])
-  if test "$enable_tls $have_cc_tls" = "yes yes"; then
+  if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
     AC_DEFINE(HAVE_CC_TLS, 1,
 	      [Define to 1 if the target assembler supports thread-local storage.])
   fi])
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index b11a5a0510411d1f8ab7631d1739aa3edcdc792b..ee5b5a768abd74382b8b9c20fa842dfbbc2c2c7c 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
+
+	* configure: Regenerate following changes to ../config/tls.m4.
+
 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
 
 	* testsuite/libgomp.fortran/stack.f90: New test.
diff --git a/libgomp/configure b/libgomp/configure
index d01039242a4a72ec2a2a4040d07d04b4e6508dac..2ffa957fa2432489f49f36c2e58af1c46687409d 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -16990,7 +16990,7 @@ fi;
 
   echo "$as_me:$LINENO: checking whether the target supports thread-local storage" >&5
 echo $ECHO_N "checking whether the target supports thread-local storage... $ECHO_C" >&6
-if test "${have_tls+set}" = set; then
+if test "${gcc_cv_have_tls+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -17020,12 +17020,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_have_tls=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=no
+gcc_cv_have_tls=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
@@ -17094,14 +17094,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -17109,12 +17109,12 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=yes
+gcc_cv_have_tls=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
       LDFLAGS="$chktls_save_LDFLAGS"
-      if test $have_tls = yes; then
+      if test $gcc_cv_have_tls = yes; then
 						chktls_save_CFLAGS="$CFLAGS"
 	thread_CFLAGS=failed
 	for flag in '' '-pthread' '-lpthread'; do
@@ -17222,14 +17222,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -17242,14 +17242,14 @@ echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-have_tls=no
+gcc_cv_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 "$enable_tls $have_tls" = "yes yes"; then
+echo "$as_me:$LINENO: result: $gcc_cv_have_tls" >&5
+echo "${ECHO_T}$gcc_cv_have_tls" >&6
+  if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS 1
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 5cc87d9200e3aea0d1b064478f7b94b44f28220e..aab2b63409ec95a415aa1302d6101b7620b9e153 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
+
+	* configure: Regenerate following changes to ../config/tls.m4.
+
 2007-09-17  Tom Tromey  <tromey@redhat.com>
 
 	* defineclass.cc (MAJOR_1_6): New define.
diff --git a/libjava/configure b/libjava/configure
index 77fcb0261e6cdbedcb1e7f6ada86ae41176bb4ab..e4074c7424f5d645e96087938bee2991d0da6510 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -27316,7 +27316,7 @@ fi;
 
   echo "$as_me:$LINENO: checking whether the target supports thread-local storage" >&5
 echo $ECHO_N "checking whether the target supports thread-local storage... $ECHO_C" >&6
-if test "${have_tls+set}" = set; then
+if test "${gcc_cv_have_tls+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -27351,12 +27351,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_have_tls=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=no
+gcc_cv_have_tls=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
@@ -27430,14 +27430,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -27445,12 +27445,12 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=yes
+gcc_cv_have_tls=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
       LDFLAGS="$chktls_save_LDFLAGS"
-      if test $have_tls = yes; then
+      if test $gcc_cv_have_tls = yes; then
 						chktls_save_CFLAGS="$CFLAGS"
 	thread_CFLAGS=failed
 	for flag in '' '-pthread' '-lpthread'; do
@@ -27563,14 +27563,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -27583,14 +27583,14 @@ echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-have_tls=no
+gcc_cv_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 "$enable_tls $have_tls" = "yes yes"; then
+echo "$as_me:$LINENO: result: $gcc_cv_have_tls" >&5
+echo "${ECHO_T}$gcc_cv_have_tls" >&6
+  if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS 1
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index efa2166e78af672d51d9f23651eacccb107d98b4..be52732ee7653c6138606aca5d46772fdd3d8d29 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
+
+	* configure: Regenerate following changes to ../config/tls.m4.
+
 2007-07-26  Tom Tromey  <tromey@redhat.com>
 
 	* Makefile.in: Rebuilt.
diff --git a/libmudflap/configure b/libmudflap/configure
index 5b15274e55c9d40709bb7d69fc150cbcd840d29b..4d5b2ad0fc230870030eefaec34ab53b0f1442a7 100755
--- a/libmudflap/configure
+++ b/libmudflap/configure
@@ -12024,7 +12024,7 @@ fi;
 
   echo "$as_me:$LINENO: checking whether the target supports thread-local storage" >&5
 echo $ECHO_N "checking whether the target supports thread-local storage... $ECHO_C" >&6
-if test "${have_tls+set}" = set; then
+if test "${gcc_cv_have_tls+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -12054,12 +12054,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_have_tls=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=no
+gcc_cv_have_tls=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
@@ -12128,14 +12128,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -12143,12 +12143,12 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_tls=yes
+gcc_cv_have_tls=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
       LDFLAGS="$chktls_save_LDFLAGS"
-      if test $have_tls = yes; then
+      if test $gcc_cv_have_tls = yes; then
 						chktls_save_CFLAGS="$CFLAGS"
 	thread_CFLAGS=failed
 	for flag in '' '-pthread' '-lpthread'; do
@@ -12256,14 +12256,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_tls=yes
+  gcc_cv_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
+gcc_cv_have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
@@ -12276,14 +12276,14 @@ echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-have_tls=no
+gcc_cv_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 "$enable_tls $have_tls" = "yes yes"; then
+echo "$as_me:$LINENO: result: $gcc_cv_have_tls" >&5
+echo "${ECHO_T}$gcc_cv_have_tls" >&6
+  if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS 1