aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-01-30 21:13:30 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-01-30 21:13:30 +0000
commit63887f3df5f9d17a88da98bdd2a761f830d61191 (patch)
tree71ec72c56e337e99215438799e720b3a51f53b87 /gold/configure.ac
parent PR breakpoints/13568: (diff)
downloadbinutils-gdb-63887f3df5f9d17a88da98bdd2a761f830d61191.tar.gz
binutils-gdb-63887f3df5f9d17a88da98bdd2a761f830d61191.tar.bz2
binutils-gdb-63887f3df5f9d17a88da98bdd2a761f830d61191.zip
Check if -fpic -mtls-dialect=gnu2 works
2012-01-30 H.J. Lu <hongjiu.lu@intel.com> * configure.ac: Check if -fpic -mtls-dialect=gnu2 works. * configure: Regenerated.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index e49bf211e6a..edc591737f1 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -359,8 +359,14 @@ AM_CONDITIONAL(OMP_SUPPORT, test "$gold_cv_c_threadprivate" = "yes")
dnl Test for the -ftls-dialect=gnu2 option.
save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -mtls-dialect=gnu2"
-AC_COMPILE_IFELSE([int i;], [have_tls_gnu2=yes], [have_tls_gnu2=no])
+CFLAGS="$CFLAGS -fpic -mtls-dialect=gnu2"
+AC_COMPILE_IFELSE([
+__thread int i;
+void foo (void)
+{
+ i = 10;
+}
+], [have_tls_gnu2=yes], [have_tls_gnu2=no])
CFLAGS="$save_CFLAGS"
AM_CONDITIONAL(TLS_GNU2_DIALECT, test "$have_tls_gnu2" = "yes")