This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 01/10] 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).

2015-08-15  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.
---
 sysdeps/hppa/configure    | 57 -----------------------------------------------
 sysdeps/hppa/configure.ac | 45 -------------------------------------
 sysdeps/hppa/dl-machine.h |  4 ++--
 sysdeps/hppa/libc-tls.c   |  4 ----
 sysdeps/hppa/nptl/tls.h   |  3 ---
 5 files changed, 2 insertions(+), 111 deletions(-)

diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index d78e1bc..2cfe6cb 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 40f3360..1ec417b 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 5f8efd4..7d0cf2c 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 e7ec590..647992a 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 ab271cf..88a0486 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.  */
-- 
2.4.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]