Configure Options

As of February 2010, Haiku's `configure` has several interesting options. These options are briefly explained by running `configure --help` on the command line. Below, additional information will be discussed as a complement to the usage output text.

  • --build-cross-tools <arch> <build tools dir>

    Compile the build tools for one of the following <arch> [x86|x86_gcc2|x86_64|ppc|arm|m68k|mips]. "x86_gcc2" will build gcc2 build tools. Using gcc2 is only a concern if you require binary compatibility with BeOS. All other architectures use gcc7. To build a supported hybrid combination you can repeat the --build-cross-tools for the secondary architecture, but without a <build tools dir>. A note about <build tools dir>.
  • --cross-tools-prefix <prefix>

    Point to pre-built binaries of the build tools. This can be used after the cross-tools have been compiled with a previous configure --build-cross-tools .... The option can be repeated to specify the secondary build tools for a Hybrid.
  • --distro-compatibility <level>

    The distribution's level of compatibility with the official Haiku distribution. The generated files will contain the respective trademarks accordingly. Currently supported values are: official -- the official Haiku distribution. compatible -- a Haiku Compatible (tm) distro. default -- any other distro (default value).
  • --include-gpl-addons

    By default, Haiku does not include GPL-licensed programs. {OpenGrok Search for GPL Addons
  • --include-3rdparty

    Certain programs are capable of being built at the same time as Haiku. This option triggers the ability to build all the software inside HAIKU_TOP/3rdparty, assuming the software itself supports it.
  • --include-patented-code

    Search the source code for HAIKU_INCLUDE_PATENTED_CODE to see which code is affected by this setting.
  • --enable-multiuser

    Enable experimental multiuser support. Since R1 is not actively targeting mulit-user functionality, this option has limited use.
  • --target=TARGET

    Originally, Haiku was being developed such that certain components could be used as drop-in replacements in BeOS. This was to allow parallel development of both the underlaying core of Haiku and the userland programs. These days, being able to build Haiku as a BeOS binary has lost priority. Patches to enhance the code to restore this functionality are welcome.
  • --target-arch <arch>

    This option is supported when building on Haiku only. <arch> is one of [x86|x86_gcc2|x86_64|ppc|arm|m68k|mips] and specifies the architecture of a compiler installed in the system to be used for building Haiku. The option can be repeated to specify the secondary compiler for a Hybrid build.
  • --use-gcc-pipe

    This is a very useful option. It instructs the build system to pass some information through system pipes instead of writing everything as temporary files. As a result, the build system will utilize additional memory and shorten the time required to build Haiku.
  • --use-xattr

    Enables the ability to emulate the BFS attribute support on other filesystems via xattrs. When using a Linux or BSD derived distribution as your development environment, some of their filesystems may support the use of this option. There are a few conditions: the (Linux) kernel must be compiled to support xattr, the filesystem itself must support xattr, and the filesystem's implementation must be adequate. See Configure Option : --use-xattr for more information.

  • --use-xattr-ref

    Similar to --use-xattr, but also works when the underlying file system has a per-file attribute size limit (often 4096 bytes) that is insufficient for the --use-xattr emulation.

  • --update

    In changeset 34867, the ability to re-run configure with the options from a previous run was implemented.
  • -j<n>

    This option allows the cross-tools to be built with similar jobs. Currently this only works when the gcc7.x cross-tools are being built. See this haiku-development mailing list post for more information.

Examples of configure

Here are some working examples for the different usage cases. These do not display the use of advanced options such as "\--use-gcc-pipe", "\--use-xattr", or "\--include-gpl-addons".
  • Building the same GCC from Haiku

    ./configure
    
  • Building from BeOS or Zeta

    ./configure --cross-tools-prefix /boot/apps/haiku/cross-tools/bin/i586-pc-haiku-
    
  • Building GCC 2.95 binutils (only for x86) from Linux/BSD/...

    ./configure --build-cross-tools x86_gcc2 ../buildtools/
    
  • Building GCC 7.x binutils for x86 from Linux/BSD/...

    ./configure --build-cross-tools x86 ../buildtools/
    
  • Pointing to recently compiled buildtools

    ./configure --cross-tools-prefix cross-tools/bin/i586-pc-haiku-
    
  • Building x86 GCC Hybrids

    Please see the page on GCC Hybrids for detailed information.

  • Building gcc7.x binutils for PPC from Linux/BSD/...

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

Some Notes

  • <build tools dir>

    This refers to the directory that contains the buildtools source code. It is usually represented by a relative path from where you are running `configure`. Typically this is "../buildtools".