[kaffe] Kaffe on XScale
Jari Korva
jpkorva at iki.fi
Thu Oct 7 01:58:56 PDT 2004
Hi,
your problems sound very familiar to me :) As Dalibor suggested, you'd
probably want to use libffi. I've had same success with this configuration:
./configure CFLAGS=-I/opt/cross/armv5b-linux/include --prefix=/wrk/moxa
--build=i686-linux --host=armv5b-softfloat-linux --enable-xscale
--without-x --disable-alsatest --disable-esdtest --disable-sound
--enable-pure-java-math --with-jikes=/opt/local/bin/jikes
--without-classpath-gtk-awt --without-kaffe-qt-awt --without-kaffe-x-awt
--with-threads=unix-pthreads --with-engine=intrp --with-libffi
--with-staticbin --enable-debug --enable-xdebugging
(You may not need all of these parameters, for example I use
--with-staticbin because my armv5b has an ancient version of glibc).
You can find my earlier experiences of using kaffe on big endian arm
from this thread: (including responses, which I got from from this
excellent community ;)
http://pogo.kaffe.org/pipermail/kaffe/2004-August/099397.html
Besides Kaffe, another Java environment that works on armv5b is gcj. Both
have several problems though :(
Cheers,
Jari
On Wed, 6 Oct 2004, Thomas Winkler wrote:
> Hello,
>
> I'm currently trying to compile kaffe for the the intel XScale (ARM, Big
> Endian).
> I tried kaffe 1.1.4 as well as kaffe CVS HEAD (20041006). But I've run into
> problems I could not manage to resolve on my own and I hope that somebody on
> the list is able to help me.
>
> build environment:
> binutils-2.15
> gcc-3.4.0
> glibc-2.3.2
>
>
>
> Kaffe 1.1.4
> -----------
>
> configure line:
>
> KAFFEH=/usr/local/kaffe/bin/kaffeh
> PATH=/usr/local/uClinux/linux_build/build/cross/bin/:$PATH
> CC=/usr/local/uClinux/linux_build/build/cross/bin/armv5b-sf-linux-gcc ../configure
> --host=armv5b-sf-linux --build=i686-linux
> --with-rt-jar=/usr/local/kaffe/jre/lib/rt.jar --enable-pure-java-math
> --disable-sound --with-awt=no
>
> build command:
>
> PATH=/usr/local/uClinux/linux_build/build/cross/bin/:$PATH make
>
> additional information:
>
> The compilation failed with some errors about unsupported assembler
> instructions.
> I managed to fix that by backporting the following lines from CVS HEAD:
>
> --- kaffe-1.1.4/config/arm/sysdepCallMethod.h 2003-12-11 17:43:33.000000000
> +0100
> +++ /usr/local/uClinux/linux_build/build/kaffe-1.1.4/config/arm/sysdepCallMethod.h
> 2004-10-06 12:00:08.349563390 +0200
> @@ -61,18 +61,18 @@
> : "=r" (r0), "=r" (r1), "=f" (f0)
> : "r" (call->function),
> "0" (r0), "1" (r1), "r" (r2), "r" (r3)
> - : "ip", "rfp", "sl", "fp", "lr");
> + : "ip", "lr");
> switch (call->rettype)
> {
> case 'V':
> break;
>
> case 'D':
> - asm volatile ("stfd %1,%0" : "=m" (call->ret->d) : "f" (f0));
> + call->ret->d = (double) f0;
> break;
>
> case 'F':
> - asm volatile ("stfs %1,%0" : "=m" (call->ret->f) : "f" (f0));
> + call->ret->f = (float) f0;
> break;
>
> case 'J':
>
> But the compilation still doesn't work out (see below).
>
>
> compilation error message:
>
> /usr/local/uClinux/linux_build/build/cross/bin/armv5b-sf-linux-gcc
> -DHAVE_CONFIG_H -I. -I../../../kaffe/kaffevm -I../../config
> -I../../include/kaffe -I../../../kaffe/kaffevm/systems/unix-jthreads -Iintrp
> -I../../../kaffe/kaffevm/intrp -I../../../libltdl -DINTERPRETER
> -I../../../kaffe/jvmpi -I../../../kaffe/xprof -I../../include
> -I/home/winkler/linux_build/build/kaffe-1.1.4/kaffe_xscale/../kaffe/kaffevm
> -I/home/winkler/linux_build/build/kaffe-1.1.4/kaffe_xscale/../kaffe/kaffevm/intrp
> -I/home/winkler/linux_build/build/kaffe-1.1.4/kaffe_xscale/../kaffe/kaffevm/systems/unix-jthreads
> -I../../../config -I../../../include -DKAFFE_VMDEBUG -g -O2 -Wall
> -Wstrict-prototypes -fsigned-char -MT support.lo -MD -MP
> -MF .deps/support.Tpo -c ../../../kaffe/kaffevm/support.c -fPIC -DPIC
> -o .libs/support.o
> ../../../kaffe/kaffevm/support.c: In function `callMethodV':
> ../../../kaffe/kaffevm/support.c:852: error: insn does not satisfy its
> constraints:
> (insn 1194 787 788 56 ../../../config/arm/sysdepCallMethod.h:71 (set (reg:DF 1
> r1)
> (reg/v:DF 16 f0 [ f0 ])) 145 {*movdf_soft_insn} (nil)
> (nil))
> ../../../kaffe/kaffevm/support.c:852: internal compiler error: in
> reload_cse_simplify_operands, at postreload.c:378
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[3]: *** [support.lo] Error 1
>
>
>
>
> Kaffe 20041006 (CVS HEAD)
> -------------------------
>
> configure line:
>
> KAFFEH=/usr/local/kaffe/bin/kaffeh
> PATH=/usr/local/uClinux/linux_build/build/cross/bin/:$PATH
> CC=/usr/local/uClinux/linux_build/build/cross/bin/armv5b-sf-linux-gcc ../configure
> --host=armv5b-sf-linux --build=i686-linux
> --with-rt-jar=/usr/local/kaffe/jre/lib/rt.jar --enable-pure-java-math
> --disable-sound --without-classpath-gtk-awt --enable-xscale
> --disable-native-awt
>
> build command:
>
> PATH=/usr/local/uClinux/linux_build/build/cross/bin/:$PATH make
>
> compilation error message:
>
> [...]
> Making all in jit
> make[3]: Entering directory
> `/usr/local/uClinux/linux_build/build/kaffe_cvs20051006/kaffe_xscale/kaffe/kaffevm/jit'
> if /bin/sh ../../../libtool --mode=compile
> --tag=CC /usr/local/uClinux/linux_build/build/cross/bin/armv5b-sf-linux-gcc
> -DHAVE_CONFIG_H -I. -I../../../../kaffe/kaffevm/jit -I../../../config
> -I../../../include/kaffe -I../../../../kaffe/kaffevm/systems/unix-pthreads
> -I../../../../kaffe/kaffevm/jni -I.. -I../../../../kaffe/kaffevm/jit/..
> -DTRANSLATOR -I../../../include
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm/jit
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm/systems/unix-pthreads
> -I../../../../binreloc -I../../../../config -I../../../../include -g -O2
> -Wno-import -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain
> -Wmissing-braces -Wmultichar -Wparentheses -Wsequence-point -Wreturn-type
> -Wswitch -Wtrigraphs -Wunused-function -Wunused-label -Wunused-parameter
> -Wunused-variable -Wunused-value -W -Wfloat-equal -Wundef -Wendif-labels
> -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
> -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wredundant-decls
> -Wnested-externs -Winline -Wlong-long -Wdisabled-optimization -fsigned-char
> -pthread -DENABLE_BINRELOC -MT methodcalls.lo -MD -MP -MF
> ".deps/methodcalls.Tpo" -c -o
> methodcalls.lo ../../../../kaffe/kaffevm/jit/methodcalls.c; \
> then mv -f ".deps/methodcalls.Tpo" ".deps/methodcalls.Plo"; else rm -f
> ".deps/methodcalls.Tpo"; exit 1; fi
> /usr/local/uClinux/linux_build/build/cross/bin/armv5b-sf-linux-gcc
> -DHAVE_CONFIG_H -I. -I../../../../kaffe/kaffevm/jit -I../../../config
> -I../../../include/kaffe -I../../../../kaffe/kaffevm/systems/unix-pthreads
> -I../../../../kaffe/kaffevm/jni -I.. -I../../../../kaffe/kaffevm/jit/..
> -DTRANSLATOR -I../../../include
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm/jit
> -I/home/winkler/linux_build/build/kaffe_cvs20051006/kaffe_xscale/../kaffe/kaffevm/systems/unix-pthreads
> -I../../../../binreloc -I../../../../config -I../../../../include -g -O2
> -Wno-import -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain
> -Wmissing-braces -Wmultichar -Wparentheses -Wsequence-point -Wreturn-type
> -Wswitch -Wtrigraphs -Wunused-function -Wunused-label -Wunused-parameter
> -Wunused-variable -Wunused-value -W -Wfloat-equal -Wundef -Wendif-labels
> -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
> -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wredundant-decls
> -Wnested-externs -Winline -Wlong-long -Wdisabled-optimization -fsigned-char
> -pthread -DENABLE_BINRELOC -MT methodcalls.lo -MD -MP
> -MF .deps/methodcalls.Tpo -c ../../../../kaffe/kaffevm/jit/methodcalls.c
> -fPIC -DPIC -o .libs/methodcalls.o
> In file included from ../../../config/../../config/arm/linux/jit-md.h:18,
> from ../../../config/../../config/arm/linux/md.h:56,
> from ../../../config/md.h:1,
> from ../../../../kaffe/kaffevm/jit/../classMethod.h:18,
> from ../../../../kaffe/kaffevm/jit/methodcalls.h:15,
> from ../../../../kaffe/kaffevm/jit/methodcalls.c:21:
> ../../../../config/arm/jit.h:105: warning: packed attribute causes inefficient
> alignment for 'loadlr'
> ../../../../config/arm/jit.h:106: warning: packed attribute causes inefficient
> alignment for 'branch'
> ../../../../config/arm/jit.h:107: warning: packed attribute causes inefficient
> alignment for 'meth'
> ../../../../config/arm/jit.h:108: warning: packed attribute causes inefficient
> alignment for 'where'
> ../../../../config/arm/jit.h:109: warning: packed attribute causes inefficient
> alignment for 'trampaddr'
> ../../../../kaffe/kaffevm/jit/methodcalls.c: In function
> `soft_fixup_trampoline':
> ../../../../kaffe/kaffevm/jit/methodcalls.c:53: warning: nested extern
> declaration of `translate'
> ../../../../kaffe/kaffevm/jit/methodcalls.c: In function
> `engine_buildTrampoline':
> ../../../../kaffe/kaffevm/jit/methodcalls.c:187: warning: use of conditional
> expressions as lvalues is deprecated
> ../../../../kaffe/kaffevm/jit/methodcalls.c:187: warning: use of cast
> expressions as lvalues is deprecated
> ../../../../kaffe/kaffevm/jit/methodcalls.c: In function `engine_callMethod':
> ../../../../kaffe/kaffevm/jit/methodcalls.c:200: error: insn does not satisfy
> its constraints:
> (insn 276 123 124 18 ../../../../config/arm/sysdepCallMethod.h:73 (set (reg:DF
> 1 r1)
> (reg/v:DF 16 f0 [ f0 ])) 145 {*movdf_soft_insn} (nil)
> (nil))
> ../../../../kaffe/kaffevm/jit/methodcalls.c:200: internal compiler error: in
> reload_cse_simplify_operands, at postreload.c:378
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[3]: *** [methodcalls.lo] Error 1
> make[3]: Leaving directory
> `/usr/local/uClinux/linux_build/build/kaffe_cvs20051006/kaffe_xscale/kaffe/kaffevm/jit'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/usr/local/uClinux/linux_build/build/kaffe_cvs20051006/kaffe_xscale/kaffe/kaffevm'
> make[1]: *** [kaffe-build-order] Error 2
> make[1]: Leaving directory
> `/usr/local/uClinux/linux_build/build/kaffe_cvs20051006/kaffe_xscale'
> make: *** [all-recursive] Error 1
>
>
>
> A similar error message is reported when configuring --with-engine=intrp:
>
> ../../../../kaffe/kaffevm/intrp/methodcalls.c: In function
> `engine_callMethod':
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:38: warning: nested extern
> declaration of `virtualMachine'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:48: warning: nested extern
> declaration of `native'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:48: warning: initialization
> makes pointer from integer without a cast
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:100: warning: nested extern
> declaration of `lockObject'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:103: warning: nested extern
> declaration of `setupExceptionHandling'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:122: warning: nested extern
> declaration of `unlockObject'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:137: warning: nested extern
> declaration of `cleanupExceptionHandling'
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:91: error: insn does not satisfy
> its constraints:
> (insn 898 555 556 40 ../../../../config/arm/sysdepCallMethod.h:73 (set (reg:DF
> 1 r1)
> (reg/v:DF 16 f0 [ f0 ])) 145 {*movdf_soft_insn} (nil)
> (nil))
> ../../../../kaffe/kaffevm/intrp/methodcalls.c:91: internal compiler error: in
> reload_cse_simplify_operands, at postreload.c:378
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[3]: *** [methodcalls.lo] Error 1
>
>
> Thank you,
> --
> Thomas Winkler
>
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
>
- Jari Korva -
- jari.korva at iki.fi -
- http://www.iki.fi/jpkorva/ -
- +358-40-756 4812 -
More information about the kaffe
mailing list