about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-14 22:07:40 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-18 02:36:31 -0400
commit43329fe1396080faf025118b31053fd19e029c12 (patch)
treecb4d58ab2b6ec6cb42202a4f4ee0101eebd3493f /sysdeps
parent3fb4cfaf1f1e8d58312720c70d224e2050d469fc (diff)
downloadglibc-43329fe1396080faf025118b31053fd19e029c12.tar.gz
glibc-43329fe1396080faf025118b31053fd19e029c12.tar.xz
glibc-43329fe1396080faf025118b31053fd19e029c12.zip
hppa: assume TLS everywhere
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).
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/hppa/configure57
-rw-r--r--sysdeps/hppa/configure.ac45
-rw-r--r--sysdeps/hppa/dl-machine.h4
-rw-r--r--sysdeps/hppa/libc-tls.c4
-rw-r--r--sysdeps/hppa/nptl/tls.h3
5 files changed, 2 insertions, 111 deletions
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index d78e1bcd64..2cfe6cbea1 100644
--- a/sysdeps/hppa/configure
+++ b/sysdeps/hppa/configure
@@ -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
diff --git a/sysdeps/hppa/configure.ac b/sysdeps/hppa/configure.ac
index 40f33603e3..1ec417b947 100644
--- a/sysdeps/hppa/configure.ac
+++ b/sysdeps/hppa/configure.ac
@@ -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
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 5f8efd4f49..7d0cf2c8b9 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -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;
diff --git a/sysdeps/hppa/libc-tls.c b/sysdeps/hppa/libc-tls.c
index e7ec5904ed..647992a96e 100644
--- a/sysdeps/hppa/libc-tls.c
+++ b/sysdeps/hppa/libc-tls.c
@@ -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
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index ab271cf241..88a0486c27 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -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.  */