ld: Add -static-pie tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / ifunc.exp
index 2b8084e2b2bf6b55f9d14cbbd264bb7b0001a399..e13b5615ff3e645a846f29ac4eab42eb981fa416 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for linker support of IFUNC symbols and relocations.
 #
-#   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2009-2019 Free Software Foundation, Inc.
 #   Contributed by Red Hat.
 #
 # This file is part of the GNU Binutils.
@@ -719,7 +719,9 @@ run_ld_link_exec_tests [list \
 # That does not happen for the pr23169 testcase where the resolver is
 # in the executable (which is relocated last by ld.so).
 if { [isnative]
-     && !([istarget "powerpc-*-*"] || [istarget "aarch64*-*-*"]) } {
+     && !([istarget "powerpc-*-*"]
+           || [istarget "aarch64*-*-*"]
+           || [istarget "sparc*-*-*"]) } {
 run_ld_link_exec_tests [list \
     [list \
        "Run pr23169a" \
@@ -775,6 +777,20 @@ run_ld_link_exec_tests [list \
        "pass.out" \
        "-fPIE -O2 -g" \
     ] \
-]}
+]
+if { $STATIC_PIE_LDFLAGS != "" } then {
+    run_ld_link_exec_tests [list \
+       [list \
+           "Run pr23169g" \
+           "$STATIC_PIE_LDFLAGS" \
+           "" \
+           { pr23169a.c pr23169b.c pr23169c.c } \
+           "pr23169g" \
+           "pass.out" \
+           "-fPIE -O2 -g" \
+       ] \
+]
+}
+}
 
 set ASFLAGS "$saved_ASFLAGS"
This page took 0.023255 seconds and 4 git commands to generate.