[kaffe] building kaffe for SESC

Dalibor Topic robilad at kaffe.org
Mon Jun 5 19:16:29 PDT 2006

Hi all,

yesterday I tried to build Kaffe for SESC [1], which uses a mipseb-linux
gcc toolchain. Since someone on the IRC channel was stuck building Kaffe
for that platform, here's how to do it with CVS head:

../kaffe/configure ac_cv_func_getnameinfo=yes --prefix=/tmp/kaffesesc
--with-engine=intrp --host=mipseb-linux CFLAGS="-mips2 -mabi=32
-Wa,-non_shared -mno-abicalls -mno-embedded-data
-mno-uninit-const-in-rodata" LDFLAGS="-static -Wl,--start-group
-lpthread -lc -lnss_files -lnss_dns -lresolv -Wl,--end-group
-Wl,--script=/home/topic/projects/sescutils/install/mipseb-linux/lib/ldscripts/mint.x"  --with-staticvm --with-staticlib --disable-plugin --disable-shared --disable-gtk-peer --disable-native-awt -with-threads=unix-jthreads --disable-vmdebug && make >& build.log && make -k install

will build & install kaffe into /tmp/kaffesesc, provided the
mipseb-linux toolchain is in path. One would have to adapt the path to
the linker script, of course. 

This differs from the CFLAGS and LDFLAGS in the SESC readme in a few
points: In CFLAGS I've added -mno-embedded-data
-mno-uninit-const-in-rodata to avoid having two data sections, as that
confuses SESC. In LDFLAGS, I've added -Wl,--start-group -lpthread -lc
-lnss_files -lnss_dns -lresolv -Wl,--end-group to make sure that a
static linkage bug with glibc installation does not cause trouble when
linking against pthreads or nss. I've also explicitely set
ac_cv_func_getnameinfo=yes, as that seems to be misdetected by the
configure script.

After modifying the kaffe script to exec sesc.mem kaffe, it doesn't yet
work, though:

topic at amy:~/projects/build-sesc$ /tmp/kaffesecs/bin/kaffe
static[0x54a0e0-0x1004c0cc] heap[0x1004e000-0x1804e000]
stack[0x1804e000-0x18846000] -> [0x9e000000-0xb62fbf20]
ExecutionFlow[0] switchIn pid(0) 0x400130 @0

ERROR: syscall 4195 at 0x4dc484, called from 0x4c4864, not supported
ExecutionFlow[0] switchOut pid(0) 0x4dc484 @67408
Destroying TQueue 4 with pending nodes

So if someone using SESC wants to take care of that, go for it. ;)

[1] http://sesc.sf.net

More information about the kaffe mailing list