How to specify which compiler to build packages with

John Marino dragonflybsd at
Wed Dec 12 14:04:28 PST 2012

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.


More information about the Users mailing list