This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41596] handling of library-related options by g++spec.c causes a failure when generating pch.
- From: "developer at sandoe-acoustics dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2009 20:25:36 -0000
- Subject: [Bug c++/41596] handling of library-related options by g++spec.c causes a failure when generating pch.
- References: <bug-41596-17110@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from developer at sandoe-acoustics dot co dot uk 2009-10-05 20:25 -------
Created an attachment (id=18715)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18715&action=view)
allow specification of -static-libstdc++ on the CL while generating PCH
this patch alters the behavior of g++spec.c such that it
(a) notes if libstdc++ is needed
(b) notes if the user has requested static-libstdc++
It only outputs "-lstdc++" if the lib is needed- and when it does it decides on
the mechanism depending on the availability of static options.
Finally, for platforms that don't have Bstatic/Bdynamic - it places
"static-libstdc++" back into the command line so that link specs can use it to
trigger substitution.
log:
*gcc/cp/g++spec.c(lang_specific_driver): Do not insert -lstdc++ unless we
really need it.
Insert 'static-libstdc++' for platforms without Bstatic/Bdynamic to
allow link spec substitution.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41596