Subject: Re: Cross-compiling problems (macppc on i386)
To: Hans-Christian Becker <hcb@phc.chalmers.se>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-macppc
Date: 04/23/1999 15:24:03
On Fri, 23 Apr 1999, Hans-Christian Becker wrote:
> 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
I'm confused, though, why you added mac68k ??
> 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
Here's my cross-compile environment script. I run this before doing any
macppc compiling.
Let me know how this helps!
Take care,
Bill
#! /bin/sh
MACHINE=macppc; export MACHINE
MACHINE_ARCH=powerpc; export MACHINE_ARCH
TNAM=powerpc-netbsd
DESTDIR=/destdirs/$MACHINE; export DESTDIR
NOLINT=1; export NOLINT
AR=/usr/pkg/cross/bin/$TNAM-ar; export AR
AS=/usr/pkg/cross/bin/$TNAM-as; export AS
CC=/usr/pkg/cross/bin/$TNAM-cc; export CC
LD=/usr/pkg/cross/bin/$TNAM-ld; export LD
NM=/usr/pkg/cross/bin/$TNAM-nm; export NM
RANLIB=/usr/pkg/cross/bin/$TNAM-ranlib; export RANLIB
SIZE=/usr/pkg/cross/bin/$TNAM-size; export SIZE
CXX=/usr/pkg/cross/bin/$TNAM-c++; export CXX
CPP="/usr/pkg/cross/lib/gcc-lib/powerpc-netbsd/egcs-2.91.60/cpp -traditional -D__GNUC__ -nostdinc";
export CPP
#CPP=/home/wrstuden/bin/cpp-$MACHINE_ARCH; export CPP
#CPP="$CC -idirafter $DESTDIR/usr/include -E"; export CPP
exec $SHELL