build.sh (NetBSD)
NetBSD's build script, which cross-compiles the whole operating system for any architecture from nearly any POSIX host, without root.
Written in the early 2000s, mainly by Luke Mewburn and Todd Vierling, it became the standard route from NetBSD 1.6 onward. The script first builds its own toolchain — compiler, linker, make and the small helper programs the build needs — and then uses that for everything else. Whether the host runs Linux, macOS or another BSD stops mattering.
For a project supporting some fifty hardware platforms, this was a necessity rather than a convenience: most of them are far too slow to build themselves. A line like ./build.sh -U -m evbarm release produces a finished install image, built as an ordinary user.