KAFFE MIPSEL 포팅
밉스 타켓에 자바가상머신을 포팅하려고 여러번 시도하였으나
JIT 엔진을 탑재하지 못하였습니다.
하기의 사항을 보시고 조언부탁드립니다.
X86에서 컴파일후 kaffeh, rt.jar를 이용하여 밉스로 포팅.
1) configure --prefix=/usr/local/kaffe
2) make ; make check ; make install
MIPSEL로 포팅하기
1) configure
#!/bin/sh
### configure option begins here
export KAFFEH=/usr/local/kaffe/bin/kaffeh
./configure \
--prefix=/usr/local/RG \
--exec-prefix=/usr/local/RG \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i686-pc-linux-gnu \
--with-engine=intrp \
--with-includes=/usr/mipsel-linux/include \
--with-libraries=/usr/mipsel-linux/lib \
--with-threads=unix-jthreads \
--disable-debug \
--disable-xprofiling \
--disable-xdebugging \
--disable-feedback \
--disable-gcj \
--disable-mips2 \
--disable-native-awt \
--without-esd \
--without-x \
--without-profiling \
--without-stats \
--with-jikes \
--enable-pure-java-math \
--with-rt-jar=/tmp/rt.jar
2) make ; make check ; make install
3) 타켓에서 실행
ms106/usr/local/RG/bin# ./java -fullversion
Engine Interpreter Version 1.1.4 Java Version 1.1
Configuration/Compilation options
Compile date Fri Dec 23 134615 KST 2005
Compile host ms106.comstar.co.kr
Install prefix /usr/local/RG
Thread system unix-jthreads
CC mipsel-linux-gcc
CFLAGS -g -O2 -Wall -Wstrict-prototypes -fno-omit-frame-pointer
LDFLAGS
ChangeLog head 2004-02-18 Jim Pick <jim@kaffe.org>
ms106/usr/local/RG/bin# ./java HelloWorld
HelloWorld
톰캣 실행 3.24 버전
가상머신엔진을 --with-engine=jit3 으로 하였을때,
에러가 발생합니다.
# ./java -verbosejit HelloWorld
<JIT java/lang/String.<clinit>()V time 10ms (10ms) @ 0x1000f820 (0x1004df98)>
<JIT java/lang/String$ICComp.<init>()V time 0ms (10ms) @ 0x1000f418 (0x1007a280)>
<JIT java/lang/Object.<init>()V time 0ms (10ms) @ 0x2ab464e0 (0x100432b0)>
<JIT java/lang/Thread.<clinit>()V time 0ms (10ms) @ 0x1009b258 (0x1007dba8)>
<JIT java/lang/RuntimePermission.<init>(Ljava/lang/String;)V time 0ms (10ms) @ 0x1000f9e8 (0x1007a3c8)>
<JIT java/security/BasicPermission.<init>(Ljava/lang/String;)V time 0ms (10ms) @ 0x1009b418 (0x1000fda8)>
<JIT java/security/Permission.<init>(Ljava/lang/String;)V time 0ms (10ms) @ 0x1009c458 (0x1006dbc8)>
<JIT java/lang/String.equals(Ljava/lang/Object;)Z time 10ms (20ms) @ 0x1009c050 (0x1004d470)>
<JIT java/lang/ClassLoader.<clinit>()V time 0ms (20ms) @ 0x100ad060 (0x10074780)>
<JIT java/util/HashMap.<init>()V time 0ms (20ms) @ 0x1009b9f0 (0x100aa7f0)>
<JIT java/util/HashMap.<init>(IF)V time 0ms (20ms) @ 0x100b90b8 (0x100aa898)>
<JIT java/util/AbstractMap.<init>()V time 0ms (20ms) @ 0x1004c6d0 (0x100ac010)>
<JIT java/lang/Throwable.<clinit>()V time 0ms (20ms) @ 0x100b4240 (0x1006aba8)>
<JIT java/lang/System.<clinit>()V time 10ms (30ms) @ 0x100d0128 (0x10050e48)>
<JIT java/util/Properties.<init>()V time 0ms (30ms) @ 0x100c5420 (0x100adbc8)>
<JIT java/util/Properties.<init>(Ljava/util/Properties;)V time 0ms (30ms) @ 0x100c5608 (0x100adc00)>
<JIT java/util/Hashtable.<init>()V time 0ms (30ms) @ 0x100c5800 (0x100bd010)>
<JIT java/util/Hashtable.<init>(IF)V time 0ms (30ms) @ 0x100b6898 (0x100bd0b8)>
<JIT java/util/Dictionary.<init>()V time 0ms (30ms) @ 0x1004c7c0 (0x100ba208)>
<JIT java/lang/StringBuffer.<init>()V time 0ms (30ms) @ 0x100c59e8 (0x100b2010)>
<JIT java/lang/StringBuffer.<init>(I)V time 0ms (30ms) @ 0x100c5bd8 (0x100b2048)>
<JIT java/lang/StringBuffer.append(Ljava/lang/String;)Ljava/lang/StringBuffer; time 0ms (30ms) @ 0x100cd438 (0x100b2278)>
<JIT java/lang/StringBuffer.ensureCapacity_unsynchronized(I)V time 0ms (30ms) @ 0x100c5dc8 (0x100b2978)>
<JIT java/lang/String.getChars(II[CI)V time 0ms (30ms) @ 0x100ce220 (0x1004d5c0)>
<JIT java/lang/StringBuffer.append(F)Ljava/lang/StringBuffer; time 0ms (30ms) @ 0x100ce040 (0x100b2438)>
<JIT java/lang/Number.<clinit>()V time 0ms (30ms) @ 0x100d4168 (0x1000d960)>
<JIT java/lang/Float.<clinit>()V time 0ms (30ms) @ 0x100ce430 (0x1005c588)>
Aborted
* kaffe-1.1.4 intrp ==> ok
jit3 ==> error
* kaffe-1.1.6 intrp ==> error
jit3 ==> error
* kaffe-cvs intrp ==> error
jit3 ==> error
intrp 엔진 사용시 에러메시지 입니다.
ms106/usr/local/RG2/bin# ./java HelloWorld
Internal error caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
at java.lang.Object.getClass (Object.java331)
at java.security.Permissions.add (Permissions.java112)
Aborted
jit3 엔진 사용시 에러메시지 입니다.
ms106/usr/local/RG33/bin# ./java HelloWorld
Illegal instruction
댓글 달기