[kaffe] undefined refernce to 'd0'

Dalibor Topic robilad at kaffe.org
Fri Jan 2 12:14:01 PST 2004


Ciao Riccardo, konichiwa Kiyo

first of all: have a successful & happy new year!

Riccardo wrote:
> Hello,
> 
> I continue building on NetBSD: I'm using 1.6.1 btw.I just upgraded to it 
> during my short absence.
> ANyway reissuing make (specifically gmake, I installed gnu-make) every 
> time continues compilation.
> 
> But it now fails with an undefined reference:
> 
> gmake[2]: Entering directory `/home/multix/kaffe-cvs/kaffe/kaffe/
> 
> <snip>
> 
> creating .libs/kaffe-binS.c
> (cd .libs && gcc -c -fno-builtin -fno-rtti -fno-exceptions "kaffe-binS.
> c")
> 
> rm -f .libs/kaffe-binS.c .libs/kaffe-bin.nm .libs/kaffe-bin.nmS .libs/
> kaffe-bin.nmT
> 
> gcc -g -Wall -Wstrict-prototypes -o .libs/kaffe-bin main.o version.o .
> libs/kaffe-binS.o -Wl,--export-dynamic  ../kaffevm/.libs/libkaffevm.so -
> lm ../../libltdl/.libs/libltdlc.a -Wl,--rpath -Wl,/usr/local/kaffe/jre/
> lib/m68k
> ./kaffevm/.libs/libkaffevm.so: undefined reference to `d0'
> gmake[2]: *** [kaffe-bin] Error 1
> 
> is d0 an internal symbol of kaffe or is it part of some system library ?

After grepping & googling around to find a good way to deal with that 
ugly 'd0', I concluded that it was coming from FLUSH_DCACHE, and 
promptly found a post from Kiyo confirming that ;)

Then I googled around for NetBSD and m68k docs on flushing the cache on 
m68k, and after a while I found m68k_sync_icache[1]. Googling for that 
gave me another post from Kiyo mentioning it as a possible solution in 
this context. ;)

So I've created a patch, analogous to the mips FLUSH_DCACHE, that uses 
th m68k_sync_icache function, and updated the config.frag on m68k/netbsd 
to link in libm68k.

I've checked the patch in, so it would be nice if Riccardo could try it 
out on his m68k-netbsd box. If it works, I'd remove the commented out 
assembler code.

cheers,
dalibor topic

[1] http://netbsd.gw.com/cgi-bin/man-cgi?m68k_sync_icache+2





More information about the kaffe mailing list