[COMMITTED] elf: Build tst-gnu2-tls2 iff compiler supports TLS descriptor

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Feb 4 20:12:05 GMT 2026


The test modules are built with
-mtls-dialect=$(have-test-mtls-descriptor), similar to tst-gnu2-tls1.

Checked on x86_64-linux-gnu.
---
 elf/Makefile | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/elf/Makefile b/elf/Makefile
index 30ac283186..396e97b5e7 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -441,7 +441,6 @@ tests += \
   tst-glibc-hwcaps-prepend \
   tst-global1 \
   tst-global2 \
-  tst-gnu2-tls2 \
   tst-hash-collision1 \
   tst-hash-collision1-gnu \
   tst-hash-collision1-sysv \
@@ -950,9 +949,6 @@ modules-names += \
   tst-filterobj-flt \
   tst-finilazyfailmod \
   tst-globalmod2 \
-  tst-gnu2-tls2mod0 \
-  tst-gnu2-tls2mod1 \
-  tst-gnu2-tls2mod2 \
   tst-hash-collision1-mod \
   tst-hash-collision1-mod-gnu \
   tst-hash-collision1-mod-sysv \
@@ -1143,8 +1139,16 @@ modules-names-tests = $(filter-out ifuncmod% tst-tlsmod% \
 extra-test-objs += tst-auditmod17.os
 
 ifneq (no,$(have-test-mtls-descriptor))
-tests += tst-gnu2-tls1
-modules-names += tst-gnu2-tls1mod
+tests += \
+  tst-gnu2-tls1 \
+  tst-gnu2-tls2 \
+  # tests
+modules-names += \
+  tst-gnu2-tls1mod \
+  tst-gnu2-tls2mod0 \
+  tst-gnu2-tls2mod1 \
+  tst-gnu2-tls2mod2 \
+  # modules-names
 $(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
 tst-gnu2-tls1mod.so-no-z-defs = yes
 CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=$(have-test-mtls-descriptor)
-- 
2.43.0



More information about the Libc-alpha mailing list