Compiling with other optimization?

Martin Egholm Nielsen martin@egholm-nielsen.dk
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 libgcj.so 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 
libgcj?
But according to the gcj-team, I should put the option in a GCJFLAGS 
variable... I wonder if the Crosstool-analouge is TARGET_GCJFLAGS?!

I've tried exporting CFLAGS, CXXFLAGS, GCJFLAGS, TARGET_CFLAGS, 
TARGET_CXXFLAGS, and TARGET_GCJFLAGS to contain "-Os" (after removing 
you test in crosstool.sh 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 libgcj.so - 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...

Regards,
  Martin


------
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