diff options
Diffstat (limited to 'ld/testsuite/ld-plugin/lto.exp')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index b14f13c..765d85f8 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -324,7 +324,20 @@ if { [is_elf_format] && [check_lto_shared_available] } { set testname "Build liblto-11.a" remote_file host delete "tmpdir/liblto-11.a" -set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] +set plugin_names { + liblto_plugin.so + liblto_plugin-0.dll + cyglto_plugin-0.dll +} +set plug_opt "" +foreach plug $plugin_names { + set plug_so [run_host_cmd $CC "--print-prog-name $plug"] + if { $plug_so ne $plug } then { + set plug_opt "--plugin $plug_so" + break + } +} +set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] if {![string match "" $catch_output]} { unresolved $testname restore_notify |