https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69388
Bug ID: 69388 Summary: Allow functexcept.cc definitions to be replaced Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Choosing the non-throwing versions of the __throw_* definitions in src/c++11/functexcept.cc requires rebuilding libstdc++ with -fno-exceptions, which is not usually practical. It would be helpful to allow them to be replaced by the application, so that a custom libstdc++ isn't needed. Maybe they could be declared weak, and we could provide an extension header for users to include (or an object file to link to) that has alternative definitions. This would mean that even exceptions thrown from inside the compiled library code (rather than just inline/template code in headers) could be transformed into abort calls per-application without using a rebuilt libstdc++.so The Taller Technologies guys are looking into using different multlib builds for -fexceptions / -fno-exceptions, this might make that unnecesary (at least for targets that support symbol interposition and/or weak symbols).