Why Clang

Matthew Seaman matthew at FreeBSD.org
Wed Jun 6 18:06:07 UTC 2012

On 06/06/2012 18:28, Thomas D. Dean wrote:
> Has the discussion on why change to clang been made available?

Yes, endlessly.  Mostly on lists like freebsd-hackers at ... and at various
conferences and developer summits.  Check the list archives.

> I would like to know the reasoning.

It's simple.  gcc-4.2, which is what the base system compiler is derived
from is:

    * fairly old

    * doesn't perform as well as more recent compilers

    * doesn't adhere to recently established standards

Clearly an update was necessary.  Unfortunately, later versions of gcc
have switched to GPLv3, which is a viral license and unacceptable to the
FreeBSD project.

Therefore clang was chosen from amongst a number of alternatives as the
best replacement.  That makes it sound as if clang is a second class
option compared to recent gcc, but this is certainly not the case:
results from clang are comparable to the latest gcc versions and the
design of clang is such that further optimizations and improvements can
be readily incorporated.

> Or, is it simply a gratuitous  change?

I can assure you that the changes were not made specifically to annoy
you.  Of course there were very solid technical reasons behind what was



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120606/dfbab84f/signature.pgp

More information about the freebsd-questions mailing list