Compiling with other optimization?

Martin Egholm Nielsen
Fri Jul 9 19:01:00 GMT 2004

>> Now I've tried with "-Os" as optimisation, but I'm not able to see 
>> any difference in library-sizes. My 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?
No, this is not the stripped version, that's right. The stripped version
is about 10megs - but that is still alot since my target has only 32 
megs of flash.
I'm pondering on changing the Makefile for so that it does not 
include (most of) java.awt.*, javax.swing.*, etc.
That will give a couple of megs, I reckon...

But the times I've tried compiling my own jar-archives into .so files, I 
recall there has been rather huge difference in resulting sizes using 
-Os instead of the default (-O1?) - a factor of 1.5-2 was not uncommon, 
as far as I can remember (been a while)...

> I guess Java stuff contains a *lot* of debug info, which of course 
> isn't any smaller when you compile with -Os...
I guess you're right there!


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list