about summary refs log tree commit diff
path: root/sysdeps/arm/configure
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-06-20 20:08:03 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-06-20 20:22:42 +0100
commit90e5dd482fc4708d559fbec9740104470ffdb9df (patch)
tree0e1cf5705463c270c44330e0b8b4660004dc55e6 /sysdeps/arm/configure
parent809fdf0d23ddb683eb60672465d7a39d02ef272b (diff)
downloadglibc-90e5dd482fc4708d559fbec9740104470ffdb9df.tar.gz
glibc-90e5dd482fc4708d559fbec9740104470ffdb9df.tar.xz
glibc-90e5dd482fc4708d559fbec9740104470ffdb9df.zip
[BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC
This fixes the calculation of R_ARM_TLS_DESC relocations for lazy global
symbol references, i.e. created with `-z lazy' in effect with the static
linker, where immediate resolution is requested with LD_BIND_NOW.
Diffstat (limited to 'sysdeps/arm/configure')
-rw-r--r--sysdeps/arm/configure36
1 files changed, 36 insertions, 0 deletions
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
index d79ef76ec9..953ef4406d 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -203,3 +203,39 @@ else
   config_vars="$config_vars
 default-abi = soft"
 fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the build tools support the GNU descriptor TLS scheme" >&5
+$as_echo_n "checking whether the build tools support the GNU descriptor TLS scheme... " >&6; }
+if ${libc_cv_arm_tls_desc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  old_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -mtls-dialect=gnu2"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+asm (".word\tfoo(tlsdesc)");
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libc_cv_arm_tls_desc=yes
+else
+  libc_cv_arm_tls_desc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$old_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls_desc" >&5
+$as_echo "$libc_cv_arm_tls_desc" >&6; }
+if test $libc_cv_arm_tls_desc = yes; then
+  config_vars="$config_vars
+have-arm-tls-desc = yes"
+else
+  config_vars="$config_vars
+have-arm-tls-desc = no"
+fi