Cross compiling for m68k/netbsd (was: Re: -fPIC for m68k/netbsd)
Kiyo Inaba
inaba at src.ricoh.co.jp
Fri Apr 9 00:44:17 PDT 1999
There should be not so many people interested in this issue.
But anyway...
> I will make test case later (I have to go to the office...),
I made small test program, which contains three files. When
you extract it and try to make 'a.out.pic' on m68k/netbsd,
it should work with '/usr/bin/as', but not work with after
market GNU 'as' (including cross compilation environment).
The error messages are,
/var/tmp/cc08014a.s: Assembler messages:
/var/tmp/cc08014a.s:10: Error: operands mismatch -- statement `jbsr _sub2,a1' ignored
I've tested with binutils-2.6, 2.81, or 2.91 but the result
is same. BTW, '/usr/bin/as' on NetBSD 1.3.1 is 1.92.3 according
to the program itself.
It looks that we can only generate fully statically linked version
of Kaffe on cross environment :-< If my assumption is correct, we
can put this into 'config.frag' or libtools. I prefer the later.
Kiyo
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# Makefile
# sub.c
# test.c
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
Xa.out: test.o sub.o
X $(CC) $(CFLAGS) -o $@ test.o sub.o
Xa.out.pic: test.o sub.pic.o
X $(CC) $(CFLAGS) -o $@ test.o sub.pic.o
Xsub.pic.o: sub.c
X $(CC) $(CFLAGS) -fpic -c $< -o $@
END-of-Makefile
echo x - sub.c
sed 's/^X//' >sub.c << 'END-of-sub.c'
Xsub1(){sub2();}
Xsub2(){}
END-of-sub.c
echo x - test.c
sed 's/^X//' >test.c << 'END-of-test.c'
Xmain(){sub1();}
END-of-test.c
exit
More information about the kaffe
mailing list