Subject: Re: building for multiple archs from a read-only tree
To: Rob Healey <rhealey@norstar.com>
From: David Querbach <querbach@realtime.bc.ca>
List: current-users
Date: 12/22/2000 09:52:43
> > So, is there some way to convince the make process to put ALL files
> > somewhere else WITHOUT using symlinks in the source tree? ALL files
> > includes droppings like .depend in addition to .o's, .so's, .a's and
> > such.
>
> I think this is what the BSDOBJDIR stuff is for. I did not used it yet
> tho, so I can't tell you what the exact steps are. Chances are there
> is description on NetBSD FAQ.
For cross-compiling, I use the following:
export BASEDIR=<whatever>
export BSDSRCDIR=${BASEDIR}/src
export RELEASEDIR=${BASEDIR}/rel.${MACHINE}
export DESTDIR=${BASEDIR}/dst.${MACHINE}
export BSDOBJDIR=${BASEDIR}/obj
export KERNOBJDIR=${BSDOBJDIR}.${MACHINE}/sys/arch/${MACHINE}
export OBJMACHINE=yes
export USR_OBJMACHINE=yes
This gives an object tree named `obj.$MACHINE' with each directory pointed
to by a symlink in the source tree. Each symlink is also named
`obj.$MACHINE', which allows building for multiple targets from the same
source tree. The KERNOBJDIR line moves the kernel build over into the
object tree as well.
Since I'm cross-compiling, I don't want the results dumped in the root, so
the DESTDIR symbol specifies where to build the target system
(`dst.$MACHINE') and the RELEASEDIR symbol specifies where to put the
tarballs (`rel.$MACHINE').
As far as I can tell, the only way to have a fully read-only source tree is
with a union mount.
Regards,
David Querbach
Real-Time Systems Inc.