[2/3] arm: Use have-mtls-dialect-gnu2 to check for ARM TLS descriptors support

Message ID 20211101125003.500945-3-adhemerval.zanella@linaro.org
State Committed
Commit 613cb5c7b19816c6ff844be7afc9faf574f834fd
Headers
Series Fix lld build for armhf |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Adhemerval Zanella Nov. 1, 2021, 12:50 p.m. UTC
  The lld linker does not support TLSDESC for arm.  The have-arm-tls-desc
is a leftover of 56583289b1 to support NaCL.

Checked on arm-linux-gnueabihf.
---
 sysdeps/arm/Makefile | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
  

Comments

Fangrui Song Nov. 1, 2021, 4:42 p.m. UTC | #1
On 2021-11-01, Adhemerval Zanella wrote:
>The lld linker does not support TLSDESC for arm.  The have-arm-tls-desc
>is a leftover of 56583289b1 to support NaCL.
>
>Checked on arm-linux-gnueabihf.

Thanks!

>---
> sysdeps/arm/Makefile | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
>diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
>index fb4164f0d9..da4226c8c8 100644
>--- a/sysdeps/arm/Makefile
>+++ b/sysdeps/arm/Makefile
>@@ -1,11 +1,6 @@
> gnulib-arch = $(elf-objpfx)libgcc-stubs.a
> static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a
>
>-# All supported build tools support TLS descriptors, but the OS may not.
>-ifndef have-arm-tls-desc
>-have-arm-tls-desc = yes
>-endif
>-
> ifeq ($(subdir),elf)
> sysdep-dl-routines += tlsdesc dl-tlsdesc
> sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
>@@ -18,7 +13,7 @@ $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
> lib-noranlib: $(objpfx)libgcc-stubs.a
>
> ifeq ($(build-shared),yes)
>-ifeq ($(have-arm-tls-desc),yes)
>+ifeq (yes,$(have-mtls-dialect-gnu2))
> tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy
> modules-names += tst-armtlsdesclocmod
> modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod
>-- 
>2.32.0
>
Reviewed-by: Fangrui Song <maskray@google.com>
  

Patch

diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
index fb4164f0d9..da4226c8c8 100644
--- a/sysdeps/arm/Makefile
+++ b/sysdeps/arm/Makefile
@@ -1,11 +1,6 @@ 
 gnulib-arch = $(elf-objpfx)libgcc-stubs.a
 static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a
 
-# All supported build tools support TLS descriptors, but the OS may not.
-ifndef have-arm-tls-desc
-have-arm-tls-desc = yes
-endif
-
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
 sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
@@ -18,7 +13,7 @@  $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
 lib-noranlib: $(objpfx)libgcc-stubs.a
 
 ifeq ($(build-shared),yes)
-ifeq ($(have-arm-tls-desc),yes)
+ifeq (yes,$(have-mtls-dialect-gnu2))
 tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy
 modules-names += tst-armtlsdesclocmod
 modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod