What brought this into my mind is this new feature in 2.5.0 "The new -static-libstdc++ option directs g++ to link the C++ library statically, even if the default would normally be to link it dynamically."
What is need here is a half way. If code is solvable static link that part but if function is being include whole dynamic link. So getting the memory saving of dynamic and the speed advantages that static can offer. Of course usable with more libs than libstdc++. -- Summary: Feature request half way option between dynamic and static linking. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: oiaohm at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41681