[kaffe] Kaffe for Big-endian ARM

Jari jpkorva at iki.fi
Wed Aug 4 00:33:27 PDT 2004


Hi,

Has anyone been able to build a working Kaffe for big-endian ARM/XScale
machines (mine is XScale IXP-422)? I tried a simple approach - in config
directory I created a symlink from armv5b to arm, but I run into two
problems:

The first one wasn't serious - configure script fails because it can't
determine libc version while cross-compiling:

checking the GNU C library version number... configure: error: cannot run
test program while cross compiling

I hacked configure a bit in order to work around this, but now the compile
fails at compiler internal error:

 armv5b-softfloat-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../../config
-I../../include/kaffe -I../../kaffe/kaffevm/systems/unix-pthreads
-I../../kaffe/kaffevm/jni -Iintrp -I./intrp -I../../libltdl -DINTERPRETER
-I../../kaffe/jvmpi -I../../kaffe/xprof -I../../include
-I../../kaffe/kaffevm/verifier -I../../kaffe/kaffevm/jni
-I/wrk/ipaq/u/jko/kaffe-cvs-head/./kaffe/kaffevm
-I/wrk/ipaq/u/jko/kaffe-cvs-head/./kaffe/kaffevm/intrp
-I/wrk/ipaq/u/jko/kaffe-cvs-head/./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 -Wuninitialized -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
libkaffevm_la-support.lo -MD -MP -MF .deps/libkaffevm_la-support.Tpo -c
support.c  -fPIC -DPIC -o .libs/libkaffevm_la-support.o
support.c:1009: warning: static declaration of 'replacechar' follows
non-static declaration
support.h:134: warning: previous declaration of 'replacechar' was here
support.c: In function `classname2pathname':
support.c:1033: warning: passing arg 3 of `replacechar' with different
width due to prototype
support.c:1033: warning: passing arg 4 of `replacechar' with different
width due to prototype
support.c: In function `pathname2classname':
support.c:1045: warning: passing arg 3 of `replacechar' with different
width due to prototype
support.c:1045: warning: passing arg 4 of `replacechar' with different
width due to prototype
support.c: In function `setProperty':
support.c:1087: warning: declaration of 'jvalue' shadows a global
declaration
../../include/jni.h:170: warning: shadowed declaration is here
support.c: In function `AllocObjectArray':
support.c:1159: warning: passing arg 2 of `newArray' as unsigned due to
prototype
support.c: In function `bitCount':
support.c:1216: warning: comparison between signed and unsigned
support.c: In function `callMethodV':
support.c:86: error: insn does not satisfy its constraints:
(insn 1370 902 903 58 ../../config/arm/sysdepCallMethod.h:73 (set (reg:DF
0 r0)
        (reg/v:DF 16 f0 [ f0 ])) 145 {*movdf_soft_insn} (nil)
    (nil))
support.c:86: 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]: *** [libkaffevm_la-support.lo] Error 1
make[3]: Leaving directory `/wrk/ipaq/u/jko/kaffe-cvs-head/kaffe/kaffevm'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/wrk/ipaq/u/jko/kaffe-cvs-head/kaffe/kaffevm'
make[1]: *** [kaffe-build-order] Error 2
make[1]: Leaving directory `/wrk/ipaq/u/jko/kaffe-cvs-head'
make: *** [all-recursive] Error 1

When compiling with jit, it fails with slightly different announcement:

In file included from ../../config/./armv5b/linux/jit-md.h:18,
                 from ../../config/./armv5b/linux/md.h:56,
                 from ../../config/md.h:1,
                 from classMethod.h:18,
                 from support.c:34:
../../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'
support.c:1009: warning: static declaration of 'replacechar' follows
non-static declaration
support.h:134: warning: previous declaration of 'replacechar' was here
support.c: In function `classname2pathname':
support.c:1033: warning: passing arg 3 of `replacechar' with different
width due to prototype
support.c:1033: warning: passing arg 4 of `replacechar' with different
width due to prototype
support.c: In function `pathname2classname':
support.c:1045: warning: passing arg 3 of `replacechar' with different
width due to prototype
support.c:1045: warning: passing arg 4 of `replacechar' with different
width due to prototype
support.c: In function `setProperty':
support.c:1087: warning: declaration of 'jvalue' shadows a global
declaration
../../include/jni.h:170: warning: shadowed declaration is here
support.c: In function `AllocObjectArray':
support.c:1159: warning: passing arg 2 of `newArray' as unsigned due to
prototype
support.c: In function `bitCount':
support.c:1216: warning: comparison between signed and unsigned
support.c: In function `callMethodV':
support.c:909: error: insn does not satisfy its constraints:
(insn 931 572 573 44 ../../config/arm/sysdepCallMethod.h:73 (set (reg:DF 1
r1)
        (reg/v:DF 16 f0 [ f0 ])) 145 {*movdf_soft_insn} (nil)
    (nil))
support.c:909: internal compiler error: in reload_cse_simplify_operands,
at postreload.c:378

Is this purely a gcc bug or are there any possible
workarounds/fixes on kaffe side?

I've used following configuration:

# ./configure --build=i386-linux
--host=armv5b-softfloat-linux --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

# armv5b-softfloat-linux-gcc -v
Reading specs from /tmp/cross/lib/gcc/armv5b-softfloat-linux/3.4.0/specs
Configured with:
/wrk/arm-linux/crosstool-0.28-rc31/build/armv5b-softfloat-linux/gcc-3.4.0-glibc-2.3.2/gcc-3.4.0/configure
--target=armv5b-softfloat-linux --host=i686-host_pc-linux-gnu
--prefix=/tmp/cross --with-float=soft --with-cpu=xscale
--enable-cxx-flags=-mcpu=xscale
--with-headers=/tmp/cross/armv5b-softfloat-linux/include
--with-local-prefix=/tmp/cross/armv5b-softfloat-linux --disable-nls
--enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c,c++,java --enable-shared --enable-c99
--enable-long-long
Thread model: posix
gcc version 3.4.0


Cheers,
  Jari




More information about the kaffe mailing list