Subject: cross-compiling changes
To: None <current-users@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 04/17/1997 15:27:23
[ CC'd to port-powerpc since there is likely to be some interest there,
as well ... maybe you noticed my mega-commit yesterday.. ]
Hi folks...
I've recently committed some changes to various system Makefiles and
bsd.*.mk files that facilitate cross-compiling. I'm using these changes
to cross-compile NetBSD/powerpc from NetBSD/hp300.
I've been building NetBSD/hp300 natively with these changes for some
time, so I don't anticipate any problems...
In any case, below I've included the environment variables I set to
turn on cross-compiling. Note, I haven't build the _entire_ source
tree with these, since there are some programs that use _VERY_ twisted
build processes that I haven't had a chance to fix up yet (namely
Kerberos, tn3270, etc.) However, I _have_ converted src/bin/sh :-)
PLEASE -- before you try this, make sure that you are running VERY
up-to-date versions of make(1), lorder(1), and the bsd.*.mk files,
as well as install(1).
PowerPC folks -- I will make toolchain sources available as soon as I
work out a buglet in the linker that prevents kernels linked with it
from booting (ugh, you don't want to know..)
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939
----- snip -----
#!/bin/sh -
# x-powerpc-env
#
# Set up cross-compiling environment for NetBSD/powerpc target
AR=/usr/local/toolchain/bin/powerpc-unknown-netbsd-ar
export AR
RANLIB=/usr/local/toolchain/bin/powerpc-unknown-netbsd-ranlib
export RANLIB
AS=/usr/local/toolchain/bin/powerpc-unknown-netbsd-as
export AS
CC=/usr/local/toolchain/bin/powerpc-unknown-netbsd-gcc
export CC
CXX=/usr/local/toolchain/bin/powerpc-unknown-netbsd-g++
export CXX
LD=/usr/local/toolchain/bin/powerpc-unknown-netbsd-ld
export LD
NM=/usr/local/toolchain/bin/powerpc-unknown-netbsd-nm
export NM
SIZE=/usr/local/toolchain/bin/powerpc-unknown-netbsd-size
export SIZE
STRIP=/usr/local/toolchain/bin/powerpc-unknown-netbsd-strip
export STRIP
OBJDUMP=/usr/local/toolchain/bin/powerpc-unknown-netbsd-objdump
export OBJDUMP
OBJCOPY=/usr/local/toolchain/bin/powerpc-unknown-netbsd-objcopy
export OBJCOPY
NOPROFILE=XXX
export NOPROFILE
EXPORTABLE_SYSTEM=XXX
export EXPORTABLE_SYSTEM
MACHINE=powerpc
export MACHINE
MACHINE_ARCH=powerpc
export MACHINE_ARCH
DESTDIR=/usr/local/toolchain/powerpc-unknown-netbsd/destdir
export DESTDIR
exec $SHELL