The attached patch is a back port of the change from
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=211067 for
gcc-4_9-branch. Bootstrap and regression tested on
x86_64-apple-darwin14 with Xcode 6.3. Okay for gcc-4_9-branch?
Jack
2015-04-12 Jack Howarth <[email protected]>
Backport from mainline
2014-05-29 Mike Stump <[email protected]>
PR debug/61352
* collect2.c (maybe_run_lto_and_relink): Be sure to always run
post ld passes when lto is used.
Index: gcc/collect2.c
===================================================================
--- gcc/collect2.c (revision 222021)
+++ gcc/collect2.c (working copy)
@@ -848,6 +848,8 @@ maybe_run_lto_and_relink (char **lto_ld_
fork_execute ("ld", lto_ld_argv);
post_ld_pass (false);
}
+ else
+ post_ld_pass (true);
}
/* Main program. */