You can configure the standard C++ library in two ways to reduce the code size and dependencies on external libraries: 1. --enable-cxx-flags=-fno-exceptions This does currently not work, due to an error in guard.cc which defines recursive_init_error::~recursive_init_error() and this results in a dependency on pure.cc and this one pulls in the IO library. 2. --disable-hosted-libstdcxx This is also broken currently (try to build it). Embedded targets may provide a hosted C environment, but in some cases it is useless to provide output messages. Also the IO library is quite huge. Two files in libstdc++/libsupc++ pull in the IO library: pure.cc and eh_term_handler.cc (via vterminate.cc). It would be nice to have a configure option (like --enable-verbose-cxx) to enable or disable the output generation in these files.
Created attachment 20463 [details] Example how to implement it
So this should be three bugs, one for each of the build problems and one enhancement request for a semi-hosted environment. I don't think "verbose" is a good name for the default case, I would prefer something like "quiet" for your suggested new mode
Good point about splitting to two or three bugs, because the build issues can probably be fixed in the 4_5-branch too.
Bug report for 1. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43863. Bug report for 2. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43865
Created attachment 20471 [details] Lets call it quiet. Configure option may be --enable-quiet-cxx.
thanks for filing the other two bugs confirmed as an enhancement
Created attachment 20993 [details] Implementation, configure and documentation Is libstdc++-v3/doc/xml/manual/configure.xml the main source for documentation?
Jon, can you follow this one too?
Created attachment 20995 [details] Implementation, configure and documentation Sorry, the config.h.in was missing.
In general, regenerated files should not be posted at all, when submitting patches / changes.
(In reply to comment #7) > > Is libstdc++-v3/doc/xml/manual/configure.xml the main source for documentation? Yes, however as you don't have a copyright assignment in place, submitting these patches might actually make it *harder* for us, as we can't use your work if it's anything substantial. I'll get this and Bug 44647 done for 4.6.0
(In reply to comment #11) [...] > I'll get this and Bug 44647 done for 4.6.0 Please have a look at Bug 43863 also.
Jon, are we going to resolve this in time for 4.6.0?
If you have no objections I'll resolve PR 43863 for 4.6.0 (by putting recurisve_init_error in a separate file) but I think this "quiet mode" needs a bit more thought and time
Of course no objections, I just couldn't figure out what we were up to.
GCC 4.6.0 is being released, adjusting target milestone.
changing target, this didn't happen for 4.6 but I want to do it for 4.7
Sorry for not finding time to work on this. I'm unassigning myself in case anyone else wants to do it, as I've got several higher priority items and am unlikely to work on this any time soon.
I finally got time to work on this and have posted an updated patch to http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01879.html I went with your original idea of disabling the "verbose" default rather than enabling a "quiet" alternative. On reflection I thought your name was better as it's consistent with the verbose terminate handler. Sorry this took so long to deal with!
Author: redi Date: Sun Sep 9 23:08:48 2012 New Revision: 191121 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191121 Log: 2012-09-10 Sebastian Huber <sebastian.huber@embedded-brains.de> Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/43852 * acinclude.m4 (GLIBCXX_ENABLE_VERBOSE): Define. * configure.ac (GLIBCXX_ENABLE_VERBOSE): Use it. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_term_handler.cc (_GLIBCXX_VERBOSE): Check new macro. * libsupc++/pure.cc (_GLIBCXX_VERBOSE): Likewise. * doc/xml/manual/configure.xml (--disable-libstdcxx-verbose): Document. * doc/html/manual/configure.html: Regenerate. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/acinclude.m4 trunk/libstdc++-v3/config.h.in trunk/libstdc++-v3/configure trunk/libstdc++-v3/configure.ac trunk/libstdc++-v3/doc/html/manual/configure.html trunk/libstdc++-v3/doc/xml/manual/configure.xml trunk/libstdc++-v3/libsupc++/eh_term_handler.cc trunk/libstdc++-v3/libsupc++/pure.cc
Done for 4.8.0