r216566 (r216568 for 4.9 branch) added %{fno-lto} to LINK_COMMAND_SPEC.
However the linker doesn't understand -fno-lto and errors out.
This causes an LTO/PGO bootstrap failure, because -fno-lto is used
during STAGEprofile.
Fixed by filtering out -fno-lto in collect2.c.
From-SVN: r216613
+2014-10-24 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR bootstrap/63632
+ * collect2.c (main): Filter out -fno-lto.
+
2014-10-24 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_item_optimizer::parse_nonsingleton_classes): Guard
ld1--;
ld2--;
}
+ else if (strncmp (arg, "-fno-lto", 8) == 0)
+ {
+ /* Do not pass -fno-lto to the linker. */
+ ld1--;
+ ld2--;
+ }
#ifdef TARGET_AIX_VERSION
else
{
+2014-10-24 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR bootstrap/63632
+ * g++.dg/torture/pr63632.C: New test.
+
2014-10-23 Jonathan Wakely <jwakely@redhat.com>
PR c++/63619
--- /dev/null
+// PR bootstrap/63632
+// { dg-do link }
+// { dg-options "-fno-lto" }
+
+int main () {}