Compiling with other optimization?
Martin Egholm Nielsen
Mon Jul 12 09:27:00 GMT 2004
>>Now I've tried with "-Os" as optimisation, but I'm not able to see any
>>difference in library-sizes. My libgcj.so is still around 50 megs -
> I haven't noticed much size difference either with -Os (on linux-arm,
> in my case), but since your library is 50 megs, are you sure you
> stripped it? I guess Java stuff contains a *lot* of debug info, which
> of course isn't any smaller when you compile with -Os...
There actually is a lot difference in size... I exported the variables:
CFLAGS, CXXFLAGS, GCJFLAGS, TARGET_CFLAGS, TARGET_CXXFLAGS, and
TARGET_GCJFLAGS to contain "-Os" and the resulting libgcj.so-file is
only 13megs (unstripped) compared to the latter 50megs.
Similar, the libstdc++ library shrunk from 5.5 megs to approx 1 megs.
However, shrinking libgcj still only brings it down to 10 megs. So the
outcome is the same...
*For Dan*: Maybe setting the optimisation in the CFLAGS- and
CXXFLAGS-flags should be allowed. You could always put the optimisation
in separate variables:
and then just use these when setting CFLAGS and CXXFLAGS later in your
scripts. Then you can still check that the user has not set the CFLAGS
and CXXFLAGS, as you do today, and then build CFLAGS="-fwhatever
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc