[cfe-dev] Results of the FreeBSD Ports build with CC=clang

Ed Schouten ed at 80386.nl
Mon Jun 1 09:32:45 PDT 2009


Hello all,

Because we at FreeBSD have a source package manager called Ports with
over 20000 packages, we thought it would be nice to waste some CPU
cycles on the build cluster to see how well Clang performs.

Unfortunately it was only capable of building 7030 packages
successfully. This sounds very bad, but when you keep in mind that it
wasn't able to build libiconv (on which 9600 other ports depend directly
or indirectly, mainly because of GNU make), that's still quite
impressive.

The build cluster only attempted to build 7241 ports, of which 211
failed. The error logs can be viewed here:

	http://pointyhat.freebsd.org/errorlogs/i386-8-exp-latest/

After some filtering and sorting, I've come up with this list, where
I've categorized all error logs:

	http://80386.nl/pub/clang-portsbuild.txt

I'll discuss some of the categories here:

GNU89:
	A lot of ports currently don't build, because they depend on
	C89, or at least GCC's `-std=gnu89' semantics. Most of them have
	missing symbols, because they use GNU-style inlining, while
	Clang uses ISO C99 style inlining by default (because it uses
	-std=gnu99).

	We also have one breakage here, because the code in question
	uses a variable called `restrict'.

	This is something we'll probably change in the Ports framework,
	where we can mark ports that require a different -std= to be
	added to the CFLAGS.

libm:
	On the build cluster we also had a problem with autoconf's way
	of detecting math functions in libm. We've not been able to
	reproduce them outside of the build cluster yet... It may be
	similar to PR4290, where Clang dislikes autoconf's way of
	building conftests for functions in <stdio.h>. Maybe it has
	already been fixed in the mean time.

Once these issues have been sorted out, I'm sure we can get better
coverage of the Ports tree and hopefully be able to try to build at
least 15000+ packages.

So Clang is doing quite a good job already, but we're not there yet.
We'll keep submitting bug reports until we're satisfied. ;-)

I'd like to thank Erwin Lansing for performing the build!

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090601/eab86d51/attachment.sig>


More information about the cfe-dev mailing list