Subject: Cross-compiling problems (macppc on i386)
To: None <port-mac68k@netbsd.org, port-macppc@netbsd.org>
From: Hans-Christian Becker <hcb@phc.chalmers.se>
List: port-mac68k
Date: 04/23/1999 09:42:42
Hi all.
Sorry for posting this to two lists, but the activity on port-macppc is so
low that an extra message probably won't hurt. I'm trying to set up my
netbsd-i386 box to cross-compile a kernel for macppc. I have followed the
instructions for the cross-powerpc package, and most of the compiling seems
to work OK. (I have also tweaked /sys/arch/conf/macppc/Makefile.macppc to
point to the cross-compile tools. I also point 'make' to macppc's share/mk
directory as well as having defined MACHINE=macppc and
MACHINE_ARCH=powerpc.) However, in lib/libkern, I get odd references to
lib/libkern/arch/i386, and obviously that generates errors. I'm at complete
loss here, so if anyone has a clue, please help me.
Best regards,
hcb

(I just saw that the build failed with a ld: compat_exec.o.o: malformed
input file (not rel or archive). I'm a little too tired now to see exactly
what went wrong there, but the i386 referece was way before the error).

Enclosed: a few ppm of make's (with -d g1) output:
# parents: libkern.a libkern.o
bswap64.o       : /home/hcb/netbsd/src/sys/lib/libkern/bswap64.c
../../../../../../sys/cdefs.h ../.././machine/cdefs.h ../.././power
pc/cdefs.h ../../../../../../sys/cdefs_aout.h ../../../../../../sys/types.h
../.././machine/types.h ../.././powerpc/types.h ../.././
machine/ansi.h ../.././powerpc/ansi.h ../.././machine/endian.h
../.././powerpc/endian.h ../.././machine/bswap.h ../.././powerpc/bswa
p.h


#
# parents: libkern.a libkern.o
bcmp.o          : /home/hcb/netbsd/src/sys/lib/libkern/arch/i386/bcmp.S
../.././machine/asm.h ../.././powerpc/asm.h

*******Note i386 reference above!


---
Hans-Christian Becker (hcb@phc.chalmers.se)
Dept. of Physical Chemistry
Chalmers University of Technology
Sweden