DragonFly On-Line Manual Pages
COMPILERS.CONF(5) DragonFly File Formats Manual COMPILERS.CONF(5)
compilers.conf -- configuration file for external compilers
The compilers.conf file allows to configure ``external'' compilers for
usage with the DragonFly build(7) system.
The /etc/defaults/compilers.conf file specifies the default settings for
all variables, the /etc/compilers.conf file specifies override settings.
The following variable definitions are mandatory:
<version>_CC The pathname of the cc compiler.
<version>_CXX The pathname of the c++ and CC compilers.
<version>_CPP The pathname of the cpp pre-processor.
<version>_INCOPT The include flags passed to the invocation of every
version of c compiler, c++ compiler, and pre-proces-
sor program. This is normally set to the predefined
<version>_INCOPTCXX The include flags passed to the invocation of every
version of c++ compiler. This is normally set to
either the DPORT_GCC_STD_INCOPTXX or
DPORT_CLANG_STD_INCOPTXX predefined variables.
These variables are optionally available:
<version>_GCC The pathname of the gcc compiler.
<version>_GXX The pathname of the g++ compiler.
<version>_GCOV The pathname of the gcov coverage testing tool.
<version>_CFLAGS Additional flags to pass to the c compilers.
<version>_CXXFLAGS Additional flags to pass to the c++ compilers.
<version>_CPPFLAGS Additional flags to pass to the pre-processors.
Currently, defaults are provided for the dports(7) compilers of clang35
(lang/clang35), gcc48 (lang/gcc48), gcc49 (lang/gcc49), and gcc5
In DragonFly, compilers are selected by setting the CCVER variable. The
cpp, cc, etc. programs in /usr/bin are actually links to the objformat(1)
deflector program which is responsible for executing the correct programs
(located in /usr/libexec/$CCVER).
Traditionally, DragonFly has 2 compilers in base, one of which is the
default compiler and the other is either a newer or older version. In
order to allow additional non-base compilers into DragonFly's build
process, objformat(1) deflects to /usr/libexec/custom when CCVER's set-
ting is not one of the compilers in base. This directory contains a cc
wrapper script (and some links to it). The wrapper script then takes
care of making the compiler look and behave like a compiler in base.
The settings in compilers.conf specify paths and flags for the
/etc/compilers.conf external compiler configuration file
Once configured the compiler can be used like this:
env CCVER=<version> make
To try building world and kernel, use:
env WORLD_CCVER=<version> make buildworld
env WORLD_CCVER=<version> make buildkernel KERNCONF=MYCONF
The compilers.conf file first appeared in DragonFly 2.3.
DragonFly 5.3 October 21, 2014 DragonFly 5.3