This is an old revision of the document!
Improving the FreeBSD build
This page does not describe how FreeBSD is currently built, but rather how it could be done in the future.
1. Portability
Portability of the FreeBSD build pivots around using tools during the build that are either readily available on different OSes or can be easily built from the FreeBSD source tree to run on those OSes. With make(1) being at the core of the build process, it follows that portability for make(1) is key. Unfortunately, FreeBSD's make is not portable. To improve portability we therefore need to improve make's portability or switch to another make. Here we opt not to re-invent the wheel and maintain (for as much as we maintain our make) a separate make(1) utility, but rather adopt bmake(1) as the portable make. Below are the key action items involved:
- Providing bmake(1)
- Port FreeBSD's source tree to bmake(1)
- Port FreeBSD's ports tree to bmake(1)
- Port FreeBSD's doc & www trees to bmake(1)
- Obsolete FreeBSD's make(1)
1.1. Providing bmake(1)
- Import bmake(1) from ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/ to contrib/bmake.
- Build and install bmake(1) from usr.bin/bmake.
1.2. Port FreeBSD's source tree to bmake(1)
1.3. Port FreeBSD's ports tree to bmake(1)
1.4. Port FreeBSD's doc & www trees to bmake(1)
1.5. Obsolete FreeBSD's make(1)
2. Improve cross-builds
The next step is to improve cross building FreeBSD. Cross building relates to building for a different architecture than the one on which the build is executed, as well as relates to building on a different OS or OS version than the source tree produces. As such, building on FreeBSD/i386 7.0 and for FreeBSD/i386 8.0 is considered a cross build. Below are the key action items involved:
- Make host- or build tools without an additional pass
- Stage system headers using dependencies
- Design and implement a build environment