tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc cross-compilation

   Date: Mon, 13 May 2013 14:35:01 -0500 (CDT)
   From: "Jeremy C. Reed" <>

   Anyone using this on non-NetBSD? What about  creating packages for 
   different operating systems (in addition to different architectures)?

   If so, any hints or steps would be appreciated. Thanks!

   (I see docs says for NetBSD for now, but wasn't sure if that was for 
   just the documented instructions, or for the capaibility.)

Funny you should ask -- just this morning I threw together a patch to
implement exactly that.  I have confirmed that it hasn't completely
broken everything for native and cross-compilation on NetBSD, but I
haven't yet tried using it to cross-build NetBSD packages from other
operating systems.  The patch is at

and use is pretty much as documented in doc/HOWTO-use-crosscompile,
except that you specify MACHINE_PLATFORM rather than MACHINE_ARCH.

I expect to find a lot of issues with pkgsrc's idea of tools (as in
USE_TOOLS) because it doesn't distinguish host tools from target tools
very well, but we'll see.  If you want to give it a spin, please let
me know how it goes!

P.S.  There is no support in that patch for cross-building packages
for operating systems other than NetBSD -- yet.  If you can bundle up
another OS's toolchain like NetBSD's $TOOLDIR, it may be a matter of
filling in some parts of and tools/tools.${OPSYS}.mk.

Home | Main Index | Thread Index | Old Index