diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 556ee1aa13..a03dd719be 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-09-22 Alan Modra + + * ld-plugin/lto.exp: Use both --print-file-name and --print-prog-name + when looking for lto plugin. + 2014-09-16 Terry Guo * ld-arm/attr-merge-arch-2.d: New test case. diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 3a4f661daf..031752ddf1 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -45,7 +45,10 @@ set plugin_names { } set plug_opt "" foreach plug $plugin_names { - set plug_so [run_host_cmd $CC "--print-file-name $plug"] + set plug_so [run_host_cmd $CC "--print-prog-name $plug"] + if { $plug_so eq $plug } then { + set plug_so [run_host_cmd $CC "--print-file-name $plug"] + } if { $plug_so ne $plug } then { set plug_opt "--plugin $plug_so" break