[HEADSUP] FYI: patch to ports that do not build with clang has been committed

Mark Linimon linimon at lonesome.com
Wed Oct 10 00:45:24 UTC 2012

The commit mail hasn't gone through yet, so I guess I need to post this
first and reference the commit mail later.

Sometime in the near future, the default CC on -current will be switched
to clang.  The patch I have committed is a workaround -- an interim measure --
to get ready for this transition.

I have made changes to ports/Mk/bsd.gcc.mk that allow the addition of
"USE_GCC=any" to a port's Makefile, and then committed that change to
various ports.  In most (but not all!) cases this will tell the port
"build with gcc instead of clang" (*) .

For those users with CC installed as gcc (including -stable), this
patch should have no effect.  Variations of combinations have been
heavily tested on pointyhat-west.  If there are any regressions, please
contact me.

You can see the difference in the errorlogs here:

With USE_GCC=any:


Without USE_GCC=any:


While the absolute number of errors is not that much different, that
is a false indication: over 2500 more packages are built "with" than

For those who wish to build *only* with clang, and thus defeat the
workaround, simply set FORCE_BASE_CC_FOR_TESTING=anything, either
in the Makefile line, or, if you are adventurous, in your /etc/make.conf.
We appreciate all the testing that we can get (it is too much for any
small group of people, much less one person.)

In the long run, I would like to see as many ports built natively with
clang as possible, and I appreciate the work that people have been doing
to move us towards that goal.  However, once the switch is made, it
would have been a burden to everyone tracking -current to have suddenly
found themselves "enlisted" in that effort :-)  So, for the medium-term,
this workaround should reduce the POLA violation.

*Note* that due to the high number (over a thousand!) ports that do not
build with clang, I arbitrarily decided to apply the workaround only to
"ports that block 2 or more other ports from building" union "important
ports".  This does not mean that the workaround shouldn't be applied to
other ports that are too hard to fix.

This is part 1 of a set of patches that are being proposed to deal with
the switchover.  As I merge and test them some more, I will put them out
for further review.



* several ports are very, very, clever, and detect clang anyways; others
build with gcc if CC is unset, but don't with CC=gcc.  These ports are
broken, and need to be fixed as we continue the process of switching over.

More information about the freebsd-ports mailing list