Subject: Re: cross-compiling changes
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Andrew Cagney <cagney@tpgi.com.au>
List: port-powerpc
Date: 04/18/1997 11:03:37
Have a look at the below, it removes the need to hardwire your environment :-)

	enjoy,
		Andrew

#!/bin/sh

root=/usr/local/psim
bsd_root=${root}/bsd-root
target=powerpc-unknown-eabi

PATH=\
${root}/${target}/bin:\
${root}/bin:\
$PATH
export PATH

CC="${target}-gcc -g" ;					export CC
LD=${target}-ld ;					export LD
CXX=${target}-g++ ;					export CXX
AS=${target}-as ;					export AS
CPP=${root}/lib/gcc-lib/${target}/2.7.2.1/cpp ;		export CPP
RANLIB=${target}-ranlib ;				export RANLIB
AR=${target}-ar ;					export AR
NM=${root}/${target}/bin/nm ;				export NM
SIZE=${target}-size ;					export SIZE
STRIP=${target}-strip ;					export STRIP

STRIPFLAGS="--strip-debug --strip-unneeded" ;		export STRIPFLAGS

HOSTED_CC=cc ;						export HOSTED_CC


TARGET=powerpc ;					export TARGET
MACHINE=powerpc ;					export MACHINE
MACHINE_ARCH=powerpc ;					export MACHINE_ARCH
NOPIC=nopic ;						export NOPIC
NOTAGS=notags ; 					export NOTAGS
NOPROFILE=noprofile ;					export NOPROFILE
NOMAN=noman ;						export NOMAN

DESTDIR=${bsd_root} ;					export DESTDIR

MAKE="make -f ${bsd_root}/usr/share/mk/sys.mk -f Makefile" ; export MAKE
MAKEFLAGS="-e -r -I ${bsd_root}/usr/share/mk" ; export MAKEFLAGS

set -x
exec $MAKE "$@"