Subject: Re: cross compiling for another NetBSD release
To: Marton Fabo <morton@eik.bme.hu>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 11/22/2004 15:58:07
[ On Monday, November 22, 2004 at 19:08:53 (+0100), Marton Fabo wrote: ]
> Subject: cross compiling for another NetBSD release
>
> Now, what is the preferred way to build a handful of packages on 
> NetBSD-Y-i386, with the target of NetBSD-X-i386, so that the resulting 
> binaries will surely and reliably run on the targeted machine?

It's not really possible for packages....  at least not yet.

Packages are built with the build-host's toolchain, source headers, and
libraries, and so they are always specific to the build host's currently
installed and running OS release.

However if your slower laptop runs a _newer_ version of NetBSD and your
faster build host runs an _older_ version of NetBSD then by using the
feature of binary compatability for older releases your laptop should be
able to run most any binary packages you build on your build host.  At
least that's true in theory -- for the most part I've only upgraded my
machines by little baby steps (patch releases) and still run old
packages that were installed on them and I've only once tried installing
a very few 1.5W built binary packages on a 1.6.1 machine (with success).

Binary compatability does not, and cannot, work the other way around
though.

In theory it should be possible to use the NetBSD build.sh toolchain
cross-compiler to build binary packages for other NetBSD platforms, and
with care it can even be made to work for some trivial examples....

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>