Prune BFD warnings for unknown GNU properties
[deliverable/binutils-gdb.git] / ld / testsuite / ld-plugin / lto.exp
index 5d354bfa9e6a6c6d18bcceeb33ff61a4a2c1970b..18829fdd64a5ea8f4cb4305488ca826dad5ad7b4 100644 (file)
@@ -262,9 +262,6 @@ set lto_link_elf_tests [list \
   [list "Build liblto-17b.so 2" \
    "-shared -O2 -fpic -flto -fuse-linker-plugin tmpdir/lto-17a.o" "-O2 -fpic -flto" \
    {lto-17b.c} {{"nm" {} "lto-17b-2.d"}} "liblto-17b.so"] \
-  [list "PR ld/12982" \
-   "-O2 -flto -fuse-linker-plugin" "-O2 -flto" \
-   {pr12982.c} {{"readelf" {-l --wide} "pr12982.d"}} "pr12982.exe"] \
   [list "PR ld/12975" \
    "-shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib -Wl,-version-script,pr12975.t" "-O2 -flto" \
    {pr12975.c} {{"readelf" {-s --wide} "pr12975.d"}} "pr12975.so" "c"] \
@@ -328,6 +325,18 @@ if { ! [istarget "arm*-*-*"] } {
   ]]
 }
 
+# PR 12982 checks that an executable stack is not created by default
+# when using the LTO plugin.  The HPPA target however requires an
+# executable stack for syscall restarts and signal returns, so we
+# skip this test for that target.
+if { ! [istarget "hppa*-*-*"] } {
+    set lto_link_elf_tests [concat $lto_link_elf_tests [list \
+  [list "PR ld/12982" \
+   "-O2 -flto -fuse-linker-plugin" "-O2 -flto" \
+   {pr12982.c} {{"readelf" {-l --wide} "pr12982.d"}} "pr12982.exe"] \
+  ]]
+}
+
 # Check final symbols in executables.
 set lto_link_symbol_tests [list \
   [list "LTO 3 symbol" \
@@ -506,6 +515,7 @@ if { [at_least_gcc_version 4 7] } {
           || [istarget "amd64-*-linux*"]) } {
        set testname "PR ld/12365"
        set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin -o tmpdir/pr12365 tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
+       set exec_output [prune_warnings $exec_output]
        if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } {
            # Linker should catch the reference to undefined `my_bcopy'
            # error caused by a GCC bug.
This page took 0.027744 seconds and 4 git commands to generate.