Compiling Haiku for x86

Article contributed by kallisti5 on Sun, 2012-09-09 15:36

x86 Compiler Toolset

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

From the haiku source directory, run the following. (be sure to adjust the options to match your build environment.)


gcc2 is the default build planned for R1 given it's BeOS binary compatibility enabling native binary BeOS applications to run on Haiku.

./configure --build-cross-tools x86_gcc2 ../buildtools


gcc4 is the default build planned for post-R1. gcc4 doesn't offer complete BeOS binary compatibility, however benefits from using a more-modern toolchain.

./configure --build-cross-tools x86 ../buildtools

gcc2h / gcc4h hybrid builds

Haiku can be build as a hybrid image meaning that it contains gcc2 as well as gcc4 binaries. More information on this can be found on the gcc-hybrid page.

x86 Haiku Builds

These builds require a valid x86 compiler toolset (see above), and might also need additional software packages installed -- see the pre-requisite software page for more details.

Compiling a basic raw Haiku disk image

This is the most basic build, it generally is good for quickly testing the OS after making modifications as it doesn't contain a lot of extra applications. Be sure to modify -j2 with the number of cpu cores on your build system to ensure the fastest build times.

jam -q -j2 @image

Compiling raw nightly disk images

This is the default nightly image build target. This contains a complete system with an included compiler. Be sure