GSoC: Making ports work with clang

"C. Bergström" cbergstrom at
Mon May 3 12:30:31 UTC 2010

Andrius Morkūnas wrote:
> On Mon, 03 May 2010 13:38:07 +0300, C. Bergström 
> <cbergstrom at> wrote:
>> I can understand from a commercial perspective why having a permissive
>> licensed production compiler could be good.. I can understand why many
>> people don't like gcc or fsf, but what does the BSD community get?
>> 1) Performance?
>> 2) Robustness?
>> 3) ... ?
> Seeing how often I see this question, maybe I'll write (or force
> rdivacky@ to do it) an explanation why clang/llvm is good for FreeBSD.
> Anyway, for now, very short version:
> 1) Performance - in the long run, yes. gcc 4.2 in base will not be
>    updated anymore. llvm on the other hand is actively developed
>    and includes fancy stuff that new CPUs have. Clang also compiles
>    stuff faster than gcc.
What fancy stuff is in the ports tree which clang will take advantage of?
> 2) Robustness - not yet. It's still too early to rely on stability of
>    clang/llvm, but eventually it will get better.
<sarcasm>I wish someone would just buy and open source EDG.. It would be 
a lot faster and less expensive</sarcasm>
> 3) BSD-like license, C99 and eventually C++0x support.
> I'm too lazy to think about this right now.
>> What's really the goal here?
> To quote myself: "make clang and ports to be friendly with each other".
> My goals are stated in the initial email and the wiki. I'll update the
> wiki with some clarification on what are and what are not my goals when
> I have more time.
>> What problem are you working to solve?
> The problem is that ports tree is full of assumptions that compiler is
> gcc. At the moment, there is no way to use alternative compiler without
> breaking too many things.
This is something I can clearly relate to and would see as beneficial.  
I can't say the gentoo/arch approach is correct, but it may not be a bad 
idea to steal whatever they have have done correctly.  I'd be more than 
happy to help or work with you if it's feasible to add another compiler 
to this project.

More information about the freebsd-ports mailing list