This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Stipping away locale support
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: bernie at develer dot com
- Date: Thu, 14 Aug 2003 20:26:09 -0500 (CDT)
- Subject: Re: Stipping away locale support
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
> I'm building an embedded C++ application and I'm
> suffering serious bloat caused by libstdc++.
> My application is quite small and uses only basic C++
> features (no threading, no wchar, no iostreams and no STL),
> but somehow all of the C locale stuff gets linked in,
> bringing several other things with it (formatters, etc.).
Telling us what you don't use is not helpful... ;-) In the future,
please tell us what you do use...
> With GCC 3.3.1, the text+data size was 384KB. In GCC 3.4,
> the size increased to 682KB. This is a serious regression.
Please report exactly what you are doing. Based on what you have said
above, I can assume the following:
- you added -static (or it is the port default)
- you probably use std::string
- you indeed ran 'size' instead of 'ls -l'
S rittle@latour; cat t.C
#include <string>
main(){std::string a;}
S rittle@latour; g++32 -static -O2 t.C
S rittle@latour; size a.out
text data bss dec hex filename
206372 46440 39256 292068 474e4 a.out
S rittle@latour; /usr/local/beta-gcc/bin/g++ -static -O2 t.C
S rittle@latour; size a.out
text data bss dec hex filename
307960 5320 38740 352020 55f14 a.out
Yes, that would be a tad annoying to an embedded developer...
Here, I see locale stuff linked into both version.
Benjamin, did locale support really balloon that much between 3.2 and
mainline or is something else in the build machinery worth looking at?
Regards,
Loren