Cross-compiling NetBSD on FreeBSD-10

I was curious to see how difficult it would be to compile NetBSD on FreeBSD 10.  Once you have the source, there is a build.sh script which is very helpful.  The build is as simple as:

./build.sh -m i386 tools
./build.sh -m i386 kernel=GENERIC release

In my case I have both clang and gcc installed.  I believe the cross-compile tools were built with clang.  The resulting gcc cross-compiler "i486--netbsdelf-gcc" was used to build the NetBSD source.

The generated binaries appear in obj/releasedir/i386/binary/

Leave a Reply