Fix PR ld/22263 on SPARC.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / tls.exp
index dd2407126271acd9824048e6d2d3044077129513..de5a86b5e57cad77a9e586a3872941e04d60c9f8 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for TLS tests.
-#   Copyright (C) 2017 Free Software Foundation, Inc.
+#   Copyright (C) 2017-2018 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -37,12 +37,18 @@ if { [which $CC] == 0 } {
     return
 }
 
+# This target requires extra GAS options when building PIC/PIE code.
+set AFLAGS_PIC ""
+if [istarget "sparc*-*-*"] {
+    append AFLAGS_PIC " -K PIC"
+}
+
 run_ld_link_tests [list \
     [list \
        "Build pr22263-1" \
        "-pie -e _start -z text" \
        "" \
-       "" \
+       "$AFLAGS_PIC" \
        { pr22263-1a.c pr22263-1b.c } \
        {{readelf -r pr22263-1.rd}} \
        "pr22263-1" \
This page took 0.024358 seconds and 4 git commands to generate.