]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86-64: Skip GNU2 TLS tests only without compiler support
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 22 Jan 2020 14:22:41 +0000 (06:22 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 22 Jan 2020 14:22:41 +0000 (06:22 -0800)
After fixing:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93319
https://sourceware.org/bugzilla/show_bug.cgi?id=25416

-mtls-dialect=gnu2 is working for x32 with GCC 10.  Skip GNU2 TLS tests
only if compiler doesn't support it.

PR ld/25416
* testsuite/ld-x86-64/tls.exp: Skip GNU2 TLS tests only without
compiler support.

ld/ChangeLog
ld/testsuite/ld-x86-64/tls.exp

index b196d2167f12311124ab3dab71cd309ae4ca9493..f71c13564d9e58fd7079b64007d50445fb378b1b 100644 (file)
@@ -1,3 +1,9 @@
+2020-01-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/25416
+       * testsuite/ld-x86-64/tls.exp: Skip GNU2 TLS tests only without
+       compiler support.
+
 2020-01-22  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-powerpc/tlsdesc3.d,
index 223c81e1afc2b5917bdf9412d97ca75671bdf9a3..2ac455ac2f4e8cfd824011ee867e16e071a522db 100644 (file)
@@ -177,8 +177,8 @@ run_ld_link_exec_tests [list \
     ] \
 ]
 
-# -mtls-dialect=gnu2 isn't supported on x32.
-if [istarget "x86_64-*-linux*-gnux32"] {
+# Skip if -mtls-dialect=gnu2 doesn't work.
+if { ![run_host_cmd_yesno $CC "-c -O2 -fPIC $GNU2_CFLAGS $srcdir/$subdir/tlsdesc1b.c -o tmpdir/tlsdesc1b.o"] } {
     return
 }