Compiling with other optimization?

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

>>> I was wondering: If I want to compile my toolchain with another 
>>> optimization level - e.g. "-Os" - how do I do this?
>>> Does the TARGET_CFLAGS="-O -mcpu=405" line in my demo-script have 
>>> anything to do with that?
>> 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 - 
>> which is the same as before...
> I'm not back, really.  And I'm pretty sure I can't help make
> libgcj any smaller.  You probably want to talk it over with
> the developers -- and maybe rethink using precompiled java...
Well, I'm not asking that specifically (o: - I was just wondering 
whether you could see if placing the "-Os" there would be the correct 
place in order for it to be propagated all the way to the creation of 
But according to the gcj-team, I should put the option in a GCJFLAGS 
variable... I wonder if the Crosstool-analouge is TARGET_GCJFLAGS?!

TARGET_CXXFLAGS, and TARGET_GCJFLAGS to contain "-Os" (after removing 
you test in for whether the two initial ones were set (o:)...
I'll inform you about the result on monday...

Another solution would be to exclude all the graphical parts from being 
compiled into - java.awt.*, javax.swing.*, etc., that is.
You could include an option somewhere in crosstool to control this, if 
you want to adapt the solution. I think it would be rather relevant for 
using gcj embedded...


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

More information about the crossgcc mailing list