diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14d3d4d6ecb5c5aafce858f14d01ab6c10c60199..99a119f9561aade5c2c7bc8cde80c7f953012076 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config.in b/gcc/config.in index 18dde6f1855d93bd5301881e7a987452286832ba..28332110dbbaf86d3b65a7614052511a27142c1a 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -357,13 +357,13 @@ #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 diff --git a/gcc/configure b/gcc/configure index 4dd9faa335f39d904b0f773ce1a3cb8dedd7f176..f1a6b627e0df0f9245c68b974344c7906895aca7 100755 --- a/gcc/configure +++ b/gcc/configure @@ -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 diff --git a/gcc/configure.ac b/gcc/configure.ac index ffe7148e5dfb5b25d471c52ca672527bdbb08b37..b486acea39ae39a60e15bfdafe611dcda65c0c8a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -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.])]) ;;