Subject: Re: Cross-compiling set-up
To: None <paul@whooppee.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 01/16/2000 02:31:01
In <Pine.NEB.4.10.10001150912580.10302-100000@pc1.whooppee.com>
paul@whooppee.com wrote
> OK, now that a m68k cross-compile package is available, I've got a
> good reason to try it out (ie, building mac68k kernels on i386 host).
>
> But, how do I set things up to use the cross-compile executables?
I'm using the following make script for news68k.
(based on ftp://ftp.netbsd.org/pub/NetBSD/arch/bebox/tools/ppc-make)
---
#! /bin/sh
DESTDIR=/export/NetBSD/news68k/root export DESTDIR
MACHINE=news68k export MACHINE
MACHINE_ARCH=m68k export MACHINE_ARCH
WHICH=m68k-netbsd
LOCAL=/usr/pkg
BINDIR=$LOCAL/cross/bin
PATH=$BINDIR:$LOCAL/cross/$WHICH/bin:$PATH:$LOCAL/cross/bin:$PATH export PATH
GCC_EXEC_PREFIX=$WHICH
AR=$BINDIR/$WHICH-ar export AR
AS=$BINDIR/$WHICH-as export AS
CC=$BINDIR/$WHICH-gcc export CC
CPP=`$CC -print-prog-name=cpp` export CPP
CXX=$BINDIR/$WHICH-c++ export CXX
FC=$BINDIR/$WHICH-f77 export FC
LD=$BINDIR/$WHICH-ld export LD
NM=$BINDIR/$WHICH-nm export NM
RANLIB=$BINDIR/$WHICH-ranlib export RANLIB
SIZE=$BINDIR/$WHICH-size export SIZE
ADDR2LINE=$BINDIR/$WHICH-addr2line export ADDR2LINE
GASP=$BINDIR/$WHICH-gasp export GASP
OBJCOPY=$BINDIR/$WHICH-objcopy export OBJCOPY
OBJDUMP=$BINDIR/$WHICH-objdump export OBJDUMP
STRINGS=$BINDIR/$WHICH-strings export STRINGS
STRIP=$BINDIR/$WHICH-strip export STRIP
HOSTED_CC=cc export HOSTED_CC
MKSHARE=no
MKMAN=no
MKINFO=no
MAKE=make export MAKE
set -x
exec $MAKE "$@"
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp