]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hppa: assume TLS everywhere
authorMike Frysinger <vapier@gentoo.org>
Sat, 15 Aug 2015 02:07:40 +0000 (22:07 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 18 Aug 2015 06:36:31 +0000 (02:36 -0400)
This brings hppa inline with all the other arches and main code where we
require TLS support everywhere.  That means dropping the defines USE_TLS
and USE___THREAD, and dropping the binutils check (since we already have
a version requirement that is new enough).

ChangeLog
sysdeps/hppa/configure
sysdeps/hppa/configure.ac
sysdeps/hppa/dl-machine.h
sysdeps/hppa/libc-tls.c
sysdeps/hppa/nptl/tls.h

index 7e4d40087f9d2addcd127c1864965591f1453af4..1ad94945ecb330942d13064b99e52aff055092d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-18  Mike Frysinger  <vapier@gentoo.org>
+
+       * sysdeps/hppa/configure.ac: Delete binutils tls checks.
+       * sysdeps/hppa/configure: Regenerated.
+       * sysdeps/hppa/dl-machine.h: Delete USE_TLS and USE___THREAD checks.
+       * sysdeps/hppa/libc-tls.c: Delete USE_TLS checks.
+       * sysdeps/hppa/nptl/tls.h: Likewise.
+
 2015-08-17  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #18823]
index d78e1bcd64dee880fb04070c2c8223c03225deca..2cfe6cbea14549d0cda2189814d1c682802ed230 100644 (file)
@@ -30,60 +30,3 @@ $as_echo "$libc_cv_asm_line_sep" >&6; }
 cat >>confdefs.h <<_ACEOF
 #define ASM_LINE_SEP $libc_cv_asm_line_sep
 _ACEOF
-
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5
-$as_echo_n "checking for hppa TLS support... " >&6; }
-if ${libc_cv_hppa_tls+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.s <<\EOF
-; Setup tls data
-.section ".tdata","awT",@progbits
-foo:   .data   32
-       .text
-; Test general dyanmic relocations
-test0:
-       addil   LT'foo-$tls_gdidx$, %r19
-       ldo     RT'foo-$tls_gdidx$(%r1), %r26
-       b       __tls_get_addr
-       nop
-; Test local dynamic relocations
-test1:
-       addil   LT'foo-$tls_ldidx$, %r19
-       b       __tls_get_addr
-       ldo     RT'foo-$tls_ldidx$(%r1), %r26
-       ldo     RR'foo-$tls_dtpoff$(%r1), %r25
-       ; More variables can be loaded...
-; Test initial exec reloctiosn
-test2:
-       mfctl   %cr27, %r26
-       addil   LT'foo-$tls_ieoff$, %r19
-       ldw     RT'foo-$tls_ieoff$(%r1), %r25
-       add     %r26, %r25, %r24
-; Test local exec relocations
-test3:
-       mfctl   %cr27, %r26
-       addil   LR'foo-$tls_leoff$, %r26
-       ldo     RR'foo-$tls_leoff$(%r1), %r25
-; Done all the TLS tests.
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-  libc_cv_hppa_tls=yes
-else
-  libc_cv_hppa_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5
-$as_echo "$libc_cv_hppa_tls" >&6; }
-if test $libc_cv_hppa_tls = no; then
-  as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
index 40f33603e3a798cee24f42b8191f202d8c286fc1..1ec417b9474c33821c54a4ec3806a1928235934f 100644 (file)
@@ -19,48 +19,3 @@ else
 fi
 rm -f conftest*])
 AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
-cat > conftest.s <<\EOF
-; Setup tls data
-.section ".tdata","awT",@progbits
-foo:   .data   32
-       .text
-; Test general dyanmic relocations
-test0:
-       addil   LT'foo-$tls_gdidx$, %r19
-       ldo     RT'foo-$tls_gdidx$(%r1), %r26
-       b       __tls_get_addr
-       nop
-; Test local dynamic relocations
-test1:
-       addil   LT'foo-$tls_ldidx$, %r19
-       b       __tls_get_addr
-       ldo     RT'foo-$tls_ldidx$(%r1), %r26
-       ldo     RR'foo-$tls_dtpoff$(%r1), %r25
-       ; More variables can be loaded...
-; Test initial exec reloctiosn
-test2:
-       mfctl   %cr27, %r26
-       addil   LT'foo-$tls_ieoff$, %r19
-       ldw     RT'foo-$tls_ieoff$(%r1), %r25
-       add     %r26, %r25, %r24
-; Test local exec relocations
-test3:
-       mfctl   %cr27, %r26
-       addil   LR'foo-$tls_leoff$, %r26
-       ldo     RR'foo-$tls_leoff$(%r1), %r25
-; Done all the TLS tests.
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  libc_cv_hppa_tls=yes
-else
-  libc_cv_hppa_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_hppa_tls = no; then
-  AC_MSG_ERROR([the assembler must support TLS])
-fi
index 5f8efd4f49cee65844a46d67a772bf229b408494..7d0cf2c8b915837ecadb9ff60ae59d3edb41544c 100644 (file)
@@ -465,7 +465,7 @@ asm (                                                                       \
    a TLS variable, so references should not be allowed to define the value.
    ELF_RTYPE_CLASS_COPY iff TYPE should not be allowed to resolve to one
    of the main executable's symbols, as for a COPY reloc.  */
-#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+#if !defined RTLD_BOOTSTRAP
 # define elf_machine_type_class(type)                          \
   ((((type) == R_PARISC_IPLT                                   \
   || (type) == R_PARISC_EPLT                                   \
@@ -684,7 +684,7 @@ elf_machine_rela (struct link_map *map,
              MIN (sym->st_size, refsym->st_size));
       return;
 
-#if defined USE_TLS && (!defined RTLD_BOOTSTRAP)
+#if !defined RTLD_BOOTSTRAP
     case R_PARISC_TLS_DTPMOD32:
       value = sym_map->l_tls_modid;
       break;
index e7ec5904eda945bb794b9befc3ea33d9cb6586fb..647992a96e7d707c2204b434361f70211d6e02c7 100644 (file)
@@ -19,8 +19,6 @@
 #include <csu/libc-tls.c>
 #include <dl-tls.h>
 
-#if USE_TLS
-
 /* On hppa, linker optimizations are not required, so __tls_get_addr
    can be called even in statically linked binaries.  In this case module
    must be always 1 and PT_TLS segment exist in the binary, otherwise it
@@ -32,5 +30,3 @@ __tls_get_addr (tls_index *ti)
   dtv_t *dtv = THREAD_DTV ();
   return (char *) dtv[1].pointer.val + ti->ti_offset;
 }
-
-#endif
index ab271cf241278f7de8db03a103c05949016fad78..88a0486c27053fa2d418e5bdf5e83375195367fd 100644 (file)
@@ -41,9 +41,6 @@ typedef union dtv
 # include <tcb-offsets.h>
 #endif /* __ASSEMBLER__ */
 
-/* Signal that TLS support is available.  */
-#define USE_TLS        1
-
 #ifndef __ASSEMBLER__
 
 /* Get system call information.  */