How to specify which compiler to build packages with

John Marino dragonflybsd at
Sat Dec 15 05:42:04 PST 2012

On 12/12/2012 23:04, John Marino wrote:
> I just added a DragonFly-specific directive to the master branch of
> If you put "DRAGONFLY_CCVER=gcc47" in the /usr/pkg/etc/make.conf" file,
> it will build all packages with DragonFly's alternate compiler, gcc
> 4.7.2. Alternatively, you could do this on a per-package basis through
> the command line, e.g. "bmake DRAGONFLY_CCVER=gcc47 install".
> Some prominent packages don't building with gcc 4.7 yet, for example
> certain versions of Mozilla's xulrunner which breaks things like Firefox
> and Thunderbird. With this new directive, I intend to add
> "DRAGONFLY_CCVER=gcc44" in the pkgsrc makefile of certain packages to
> force them to build with GCC 4.4.7 in all cases (overriding make.conf).
> This will make sure we don't have pkgsrc in the critical path of making
> the GCC 4.7 the primary compiler in the future.

If you use this feature, change /usr/pkg/etc/mk.conf entry to:

mk.conf will override the Makefile if "=" is used and that is not 
desired.  If the Makefile has DRAGONFLY_CCVER set, it's for a reason and 
it shouldn't be overridden.

The "?=" means to set DRAGONFLY_CCVER only if it's not already defined.


More information about the Users mailing list