Check if linker supports R_386_TLS_GD_PLT, R_386_TLS_LDM_PLT relocs
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 10 Jan 2012 13:21:53 +0000 (13:21 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 10 Jan 2012 13:21:53 +0000 (13:21 +0000)
* configure.ac (gcc_cv_as_ix86_tlsgdplt): Check if linker
supports R_386_TLS_GD_PLT reloc.
(gcc_cv_as_ix86_tlsldmplt): Check if linker
supports R_386_TLS_LDM_PLT reloc.
* configure: Regenerate.
* config.in: Regenerate.

From-SVN: r183063

gcc/ChangeLog
gcc/config.in
gcc/configure
gcc/configure.ac

index 14d3d4d..99a119f 100644 (file)
@@ -1,3 +1,12 @@
+2012-01-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * configure.ac (gcc_cv_as_ix86_tlsgdplt): Check if linker
+       supports R_386_TLS_GD_PLT reloc.
+       (gcc_cv_as_ix86_tlsldmplt): Check if linker
+       supports R_386_TLS_LDM_PLT reloc.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+
 2012-01-10  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/49868
index 18dde6f..2833211 100644 (file)
 #endif
 
 
-/* Define if your assembler supports @tlsgdplt. */
+/* Define if your assembler and linker support @tlsgdplt. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_IX86_TLSGDPLT
 #endif
 
 
-/* Define if your assembler supports @tlsldmplt. */
+/* Define if your assembler and linker support @tlsldmplt. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_IX86_TLSLDMPLT
 #endif
index 4dd9faa..f1a6b62 100755 (executable)
@@ -24823,7 +24823,11 @@ else
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }
     then
-       gcc_cv_as_ix86_tlsgdplt=yes
+       if test x$gcc_cv_ld != x \
+        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+          gcc_cv_as_ix86_tlsgdplt=yes
+        fi
+        rm -f conftest
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
@@ -24854,7 +24858,11 @@ else
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }
     then
-       gcc_cv_as_ix86_tlsldmplt=yes
+       if test x$gcc_cv_ld != x \
+        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+          gcc_cv_as_ix86_tlsldmplt=yes
+        fi
+        rm -f conftest
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
index ffe7148..b486ace 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to generate a configuration script.
 
 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -3674,15 +3674,25 @@ foo:    nop
 
     gcc_GAS_CHECK_FEATURE([R_386_TLS_GD_PLT reloc],
         gcc_cv_as_ix86_tlsgdplt,,,
-       [call    tls_gd@tlsgdplt],,
+       [call    tls_gd@tlsgdplt],
+       [if test x$gcc_cv_ld != x \
+        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+          gcc_cv_as_ix86_tlsgdplt=yes
+        fi
+        rm -f conftest],
       [AC_DEFINE(HAVE_AS_IX86_TLSGDPLT, 1,
-        [Define if your assembler supports @tlsgdplt.])])
+        [Define if your assembler and linker support @tlsgdplt.])])
 
     gcc_GAS_CHECK_FEATURE([R_386_TLS_LDM_PLT reloc],
         gcc_cv_as_ix86_tlsldmplt,,,
-       [call    tls_ld@tlsldmplt],,
+       [call    tls_ld@tlsldmplt],
+       [if test x$gcc_cv_ld != x \
+        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+          gcc_cv_as_ix86_tlsldmplt=yes
+        fi
+        rm -f conftest],
       [AC_DEFINE(HAVE_AS_IX86_TLSLDMPLT, 1,
-        [Define if your assembler supports @tlsldmplt.])])
+        [Define if your assembler and linker support @tlsldmplt.])])
 
     ;;