This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: compile SPEC JVM98 using gcj ?
>>>>> "Thomas" == Thomas Johnsson <thomas@gatespacetelematics.com> writes:
Thomas> can anybody give information on how to compile the SPEC JVM98
Thomas> benchmarks using gcj?
I have done it. It is not difficult, but we have to deal with classes
having the same name in different packages. Main, Context and Node are
such classes.
The following shell script is ad-hoc but sufficient to compile SPEC
JVM98. Place the script on the top directory of SPEC JVM98, invoke it
and you have an executable named a.out.
======================================================================
#!/bin/sh
GCJ=gcj
OPTION='-O2'
#OPTION='-O2 -march=pentium4 -ffast-math'
#OPTION='-O0'
RM=rm
COMPILE="$GCJ $OPTION"
# compile all files
$COMPILE -c `find . -name '*.class' -o -name '*.java'`
# compile Main
$RM Main.o
$COMPILE -c -o Main-javac.o spec/benchmarks/_213_javac/Main.class
$COMPILE -c -o Main-raytrace.o spec/benchmarks/_205_raytrace/Main.java
$COMPILE -c -o Main-mtrt.o spec/benchmarks/_227_mtrt/Main.java
$COMPILE -c -o Main-mpegaudio.o spec/benchmarks/_222_mpegaudio/Main.java
$COMPILE -c -o Main-check.o spec/benchmarks/_200_check/Main.java
$COMPILE -c -o Main-checkit.o spec/benchmarks/_999_checkit/Main.java
$COMPILE -c -o Main-jess.o spec/benchmarks/_202_jess/Main.java
$COMPILE -c -o Main-db.o spec/benchmarks/_209_db/Main.java
$COMPILE -c -o Main-compress.o spec/benchmarks/_201_compress/Main.java
# compile Context
$RM Context.o
$COMPILE -c -o Context-harness.o spec/harness/Context.java
$COMPILE -c -o Context-javac.o spec/benchmarks/_213_javac/Context.class
$COMPILE -c -o Context-jess.o spec/benchmarks/_202_jess/jess/Context.java
# compile Node
$RM Node.o
$COMPILE -c -o Node-javac.o spec/benchmarks/_213_javac/Node.class
$COMPILE -c -o Node-jess.o spec/benchmarks/_202_jess/jess/Node.java
# link
$GCJ -o a.out -fmain=SpecApplication *.o
======================================================================
Kazuyuki Shudo 2006@shudo.net http://www.shudo.net/