COMPILERS.CONF(5) BSD File Formats Manual COMPILERS.CONF(5)NAMEcompilers.conf — configuration file for external compilers
SYNOPSIS
/etc/compilers.conf
DESCRIPTION
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 variables are available:
<version>_CC The pathname of the cc program of the compiler.
<version>_CFLAGS Any additional flags to pass to <version>_CC.
<version>_CPP The pathname of the cpp program of the compiler.
<version>_CPPFLAGS Any additional flags to pass to <version>_CPP.
<version>_CXX The pathname of the c++ program of the compiler.
<version>_CXXFLAGS Any additional flags to pass to <version>_CXX.
<version>_VERSION What to output when the -dumpversion option is used.
This helps clang with pkgsrc(7).
Once configured the compiler can then be used like this:
env CCVER=clang make
To build world and kernel, use the following instructions:
cd /usr/src
fetch http://leaf.dragonflybsd.org/~swildner/world_clang.diff
patch -p1 <world_clang.diff
env WORLD_CCVER=clang make -DNO_GCC44 buildworld
env WORLD_CCVER=clang make buildkernel KERNCONF=MYCONF
Currently, defaults are provided for clang (installed from pkgsrc(7)'s
lang/clang), clangsvn (installed from SVN trunk as described in
http://clang.llvm.org/get_started.html), gcc46 (installed from
pkgsrc(7)'s lang/gnat-aux) and pcc (installed from pkgsrc(7)'s
lang/pcc-current).
IMPLEMENTATION NOTES
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
/usr/libexec/custom/cc script.
FILES
/etc/compilers.conf external compiler configuration file
SEE ALSOobjformat(1), build(7)HISTORY
The compilers.conf file first appeared in DragonFly 2.3.
BSD February 28, 2011 BSD