clang, which many people look to as a gcc replacement, is now able to build itself. (Thanks John Marino for the heads-up, some time ago) It can also build world and kernel on DragonFly, going on the work of Sascha Wildner!
Using the pkgsrc package, put
in /etc/compilers.conf and then set $CCVER to “clang” when building:
env WORLD_CCVER=clang make -DNO_GCC44 buildworld
I haven’t tried this, so any errors in description are mine, not Sascha’s – can someone verify? I don’t have a test system to run it on right now.
Edit: see Sascha’s comment for the definitive method.