]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Find lto plugin when using gcc-5.0
authorAlan Modra <amodra@gmail.com>
Mon, 22 Sep 2014 08:44:27 +0000 (18:14 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 22 Sep 2014 09:34:48 +0000 (19:04 +0930)
I originally had this as --print-prog-name and changed back to
--print-file-name to suit older gcc, neglecting to check whether
gcc-5.0 --print-file-name finds the lto plugin.  It doesn't.

* ld-plugin/lto.exp: Use both --print-file-name and --print-prog-name
when looking for lto plugin.

ld/testsuite/ChangeLog
ld/testsuite/ld-plugin/lto.exp

index 556ee1aa13a0647ccb2f2cf04bf72b52e7635ded..a03dd719beb15ec24468566260f60a75217f1d57 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-22  Alan Modra  <amodra@gmail.com>
+
+       * ld-plugin/lto.exp: Use both --print-file-name and --print-prog-name
+       when looking for lto plugin.
+
 2014-09-16  Terry Guo  <terry.guo@arm.com>
 
        * ld-arm/attr-merge-arch-2.d: New test case.
index 3a4f661daf744ee66bc52f1dae046c04bef649f7..031752ddf15f049583d59baba8fd5362697414f4 100644 (file)
@@ -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