]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sparc: Compile TLS LD tests with -fPIC
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 10 Sep 2025 12:12:31 +0000 (05:12 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 12 Sep 2025 15:28:54 +0000 (08:28 -0700)
After

commit 8cad8f94b450be9b73d07bdeef7fa1778d3f2b96
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Sep 5 15:40:51 2025 -0700

    c: Update TLS model after processing a TLS variable

GCC will upgrade local-dynamic TLS model to local-exec without -fPIC.
Compile TLS LD tests with -fPIC to keep local-dynamic TLS model.

PR testsuite/121888
* gcc.target/sparc/tls-ld-int16.c: Compile with -fPIC.
* gcc.target/sparc/tls-ld-int32.c: Likewise.
* gcc.target/sparc/tls-ld-int64.c: Likewise.
* gcc.target/sparc/tls-ld-int8.c: Likewise.
* gcc.target/sparc/tls-ld-uint16.c: Likewise.
* gcc.target/sparc/tls-ld-uint32.c: Likewise.
* gcc.target/sparc/tls-ld-uint8.c: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/testsuite/gcc.target/sparc/tls-ld-int16.c
gcc/testsuite/gcc.target/sparc/tls-ld-int32.c
gcc/testsuite/gcc.target/sparc/tls-ld-int64.c
gcc/testsuite/gcc.target/sparc/tls-ld-int8.c
gcc/testsuite/gcc.target/sparc/tls-ld-uint16.c
gcc/testsuite/gcc.target/sparc/tls-ld-uint32.c
gcc/testsuite/gcc.target/sparc/tls-ld-uint8.c

index de4ce4034c6df79de7c97bcd88950179a3061009..38fe1b28f6c3fb70ad8fa8b41ef46d9379959b39 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */
 
index 5604c24151ac14fa90fafab5f7e0b65f391f8be9..90cd4a4db8dda851c5e4edb1b1968e85af978d9f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */
 
index c1925df084fb2a0cd6702ab82a658d4b3a0f5c20..72e437d70ed86806083a5b07625a7b9293461010 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-require-effective-target lp64 } */
 
index 17eb32ea2a107c51f2febcdf726ab74df412b8f5..5837a3e46d82c5f069f9face84cb8c3114141a26 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */
 
index 81990a7bf3ca5a5af35fff3158281172b484d02c..df2eb064feb3857ee0f865f61e20e9b6fbf269cd 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */
 
index 60524ba87cf6a1094420b709550abc92578c0b02..4639bbbbda0b76153cea4038f256e01c2c625215 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */
 
index 7a7492197f95248803d68c06e6a626629a611996..265291f5f4bbdbe6be3571767c3f4f0db88a7125 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" }
+/* { dg-options "-O2 -fPIC" }
 /* { dg-add-options tls } */
 /* { dg-skip-if "native tls expected" { tls_emulated } } */