- cd build/pruned; \
- for A in `find . -name \*.class -or -name \*.java`; do \
- echo compiling $$A....; \
- ../../upstream/install/bin/$(target)-gcj -w -c -fCLASSPATH=../../build/class $$A && \
+
+ rm build/pruned/gnu/gcj/runtime/FirstThread*.class
+ cp upstream/gcc-3.3/src/libjava/gnu/gcj/runtime/FirstThread.java build/pruned/gnu/gcj/runtime/
+
+ rm build/pruned/org/ibex/plat/GCJ*.class
+ cp build/java/org/ibex/plat/GCJ.java build/pruned/org/ibex/plat/
+
+ cp upstream/gcc-3.3/build-$(target)/$(target)/libjava/java/lang/Object.class build/pruned/java/lang/
+
+ find build/pruned/gnu/java/locale/ -name 'LocaleInformation_*' -not -name 'LocaleInformation_en.class' -not -name 'LocaleInformation_en_US.class' -exec rm {} \;
+
+# cd build/pruned; fastjar cvf ../../tmp.jar .
+# java -jar lib/jarg.jar -verbose -verboseufm -normlv -normsf -normsy -normin \
+# -normex -nornc -nornf -nornm -nobco tmp.jar
+# cd build/pruned; fastjar xvf ../../tmp.jar
+
+# try oneshot compile/link
+# --redefine-sym to merge errorthrowers? or do this in C++?
+# --rename-section to try to merge Utf8 sections?
+
+ cd build/pruned; \
+ for A in `find . -name \*.class -or -name \*.java`; do \
+ echo compiling $$A....; \
+ ../../upstream/install/bin/$(target)-gcj \
+ -fdata-sections -ffunction-sections -w -c -Os \
+ -fCLASSPATH=../../build/$(platform)/ibex.jar $$A && \