libstdc++ question

Fery engard.ferenc@innomed.hu
Fri May 7 14:43:00 GMT 2004


Hi all!

I use GCC on a Renesas SH processor, without OS. I do not use much from
newlib (practically only malloc(), memcpy() and a few other utils, and
new from libstdc++). I do not use exceptions, no rtti, IO or anything
else.

Now I would like to use STL. My first try using vector<> (just defining
a vector<int>) resulted in increasing the binary size by cca. 240KB.
:-(  It practically included everything: exception handling, streams,
locale, newlib IO etc. Unfortunately, this is not affordable to me, so I
wonder what can I do?

I have invented that the key is the stl-inst.o in libstdc++, which is
included by std::__default_alloc_template, and includes functexcept.o,
which includes everything. Functexcept.o would not include anything if
it would compile without the macro __EXCEPTIONS defined.

I have copied functexcept.cc to my project, and use the versions calling
abort() instead of exceptions. With this, using a vector increased my
project with a reasonable size of 15K. Is it an ugly hack what can cause
me problems, or is it the Right Way?

Or I should recompile libstdc++ without exception support? How can I do
that? (I use a binary crossgcc from KPIT; never compiled GCC.)

Thanks,
Ferenc

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list