Compiling Haiku for x86
gcc2h / gcc8 hybrid builds
Haiku can be build as a hybrid image meaning that it contains gcc2 as well as gcc8 binaries. More information on this can be found on the gcc-hybrid page.
This configuration is the default and is required to run both BeOS legacy applications as well as modern one using the recent programming language features available in newer gcc versions.
Building Haiku from Haiku
When building from Haiku, all the required tools are already installed in the release image, therefore you can run configure without any arguments:
(Note: Currently as of Aug-14-2021 the package “xorriso” must be installed from HaikuDepot before compiling the anyboot image.)
x86 Compiler Toolset for non-Haiku systems
When building from another operating system (Linux, for example), you need to compile the buildtools as well during the configure stage.
Building the x86 compiler toolset is quite easy and involves generating gcc binaries for your platform. For a complete list of flags for the configure script, see Haiku's Configure Options
./configure --cross-tools-source ../buildtools --build-cross-tools x86_gcc2 --build-cross-tools x86
Compiling raw nightly disk images
This is the default nightly image build target. This contains a complete system with an included compiler. Be sure to modify -j2 with the number of cpu cores on your build system to ensure the fastest build times.
jam -q -j2 @nightly-raw
Compiling anyboot nightly disk images
You can also choose to build an anyboot image (
*.img) instead, which is generally more useful for virtualization software.
jam -q -j2 @nightly-anyboot