.\" .\" Copyright (c) 2009 .\" The DragonFly Project. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" 3. Neither the name of The DragonFly Project nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific, prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd February 25, 2011 .Os .Dt COMPILERS.CONF 5 .Sh NAME .Nm compilers.conf .Nd configuration file for external compilers .Sh SYNOPSIS .Pa /etc/compilers.conf .Sh DESCRIPTION The .Nm file allows to configure .Dq external compilers for usage with the .Dx .Xr build 7 system. .Pp The .Pa /etc/defaults/compilers.conf file specifies the default settings for all variables, the .Pa /etc/compilers.conf file specifies override settings. .Pp The following variables are available: .Bl -tag -width ".Va _CPPFLAGS" .It Va _CC The pathname of the .Nm cc program of the compiler. .It Va _CFLAGS Any additional flags to pass to .Va _CC . .It Va _CPP The pathname of the .Nm cpp program of the compiler. .It Va _CPPFLAGS Any additional flags to pass to .Va _CPP . .It Va _CXX The pathname of the .Nm c++ program of the compiler. .It Va _CXXFLAGS Any additional flags to pass to .Va _CXX . .It Va _VERSION What to output when the .Fl dumpversion option is used. This helps .Nm clang with .Xr pkgsrc 7 . .El .Pp Once configured the compiler can then be used like this: .Bd -literal -offset indent env CCVER=clang make .Ed .Pp To build world and kernel, use the following instructions: .Bd -literal -offset indent cd /usr/src fetch http://leaf.dragonflybsd.org/~swildner/world_clang.diff patch -p1