Linked by Thom Holwerda on Wed 7th Nov 2012 23:50 UTC, submitted by Joel Dahl
FreeBSD "I've made clang the default on x86 systems. There will probably be a few bumps as we work out the last kinks including a ABI issue for i386 system libraries, but the transition is expected to be fairly smooth for most users."
Thread beginning with comment 541350
To view parent comment, click here.
To read all comments associated with this story, please click here.
why?
by sergio on Thu 8th Nov 2012 04:27 UTC in reply to "Awesome"
sergio
Member since:
2005-07-06

I'm not a compiler expert, I'm only a GCC and FreeBSD user, so from a practical point of view... why do you consider Clang so awesome?

To me It always smelled like a political decision and not a technical one... Apple wanted a BSD-licensed compiler and not a GPL one so they spent zillons of dollars creating a new one and alienating the open source community.

But maybe I'm wrong and there are technical reasons to have Clang and dismiss good old GCC...

Reply Parent Score: 5

RE: why?
by ideasman42 on Thu 8th Nov 2012 04:56 in reply to "why?"
ideasman42 Member since:
2007-07-20

clang is really very good compiler, though I think you're right - its a licensing issue, at the moment I wouldn't say clang is a better compiler.

For C, they both do well, for C++, clang is still not 100%.

And on both C/C++ clang misses OpenMP, which may be a big deal if you're using that a lot.

I do benchmarks once in a while and for me - (testing cycles-raytracer), clang is still slower then gcc (5-10%), and has been for over a year.

IMHO the advantage is more with is ability to integrate with IDE's and be used as a library. - clang/python for example is pretty nice, though focused on IDE's rather then giving you access to all info.

Reply Parent Score: 4

RE[2]: why?
by Lazarus on Thu 8th Nov 2012 05:07 in reply to "RE: why?"
Lazarus Member since:
2005-08-10

I do benchmarks once in a while and for me - (testing cycles-raytracer), clang is still slower then gcc (5-10%), and has been for over a year.


Are you comparing current (at the time) Clang vs. current (at the time) GCC, or the ancient version of GCC in FreeBSD's base?

Reply Parent Score: 2

RE[2]: why?
by zio_tom78 on Thu 8th Nov 2012 09:10 in reply to "RE: why?"
zio_tom78 Member since:
2008-04-10

I agree. Clang provides fantastically clear error messages, expecially when you use templates. But the lack of support for OpenMP is a severe impediment for those like me that do HPC (I am working in a large astrophysical project, and our codes run on machines with 12 cores at least and take hours/days to complete!).

By the way, this is the reason why I removed Mac OS X from my Macbook and replaced it with Ubuntu: to have a reasonably updated version of gcc instead of the very old one bundled with Lion.

Reply Parent Score: 2

RE: why?
by kwan_e on Thu 8th Nov 2012 04:59 in reply to "why?"
kwan_e Member since:
2007-02-18

But maybe I'm wrong and there are technical reasons to have Clang and dismiss good old GCC...


Outside of licensing issues, it is the fact that LLVM is designed to have better support for creating tooling extensions. LLVM is highly modularized and pluggable.

Reply Parent Score: 2

RE[2]: why?
by ideasman42 on Thu 8th Nov 2012 05:15 in reply to "RE: why?"
ideasman42 Member since:
2007-07-20

Sure, but all things equal - why would you switch if clang misses OpenMP and can't compile some C++ apps (inkscape for example fails, and some areas need non-trivial re-working to make it compatible).

Still, hopefully being default in BSD gives some incentive for clang to become as complete as GCC.

Reply Parent Score: 3

RE: why?
by demetrioussharpe on Thu 8th Nov 2012 13:28 in reply to "why?"
demetrioussharpe Member since:
2009-01-09

To me It always smelled like a political decision and not a technical one... Apple wanted a BSD-licensed compiler and not a GPL one so they spent zillons of dollars creating a new one and alienating the open source community.


You think Apple is the only organization that doesn't want a GPL licensed compiler? Stop & ask yourself why a (Free|Net|Open|Dragonfly|PC)-BSD based OS wouldn't want a BSD licensed compiler. Those guys don't just use BSD-licensed software on a whim. They believe in that model of software licensing & I highly doubt that they'd want to be at the mercy of the GPL license model --which changes on a whim, the same way that GPL code changes on a whim.

Reply Parent Score: 1

RE[2]: why?
by TechGeek on Thu 8th Nov 2012 18:31 in reply to "RE: why?"
TechGeek Member since:
2006-01-14

"To me It always smelled like a political decision and not a technical one... Apple wanted a BSD-licensed compiler and not a GPL one so they spent zillons of dollars creating a new one and alienating the open source community.


You think Apple is the only organization that doesn't want a GPL licensed compiler? Stop & ask yourself why a (Free|Net|Open|Dragonfly|PC)-BSD based OS wouldn't want a BSD licensed compiler. Those guys don't just use BSD-licensed software on a whim. They believe in that model of software licensing & I highly doubt that they'd want to be at the mercy of the GPL license model --which changes on a whim, the same way that GPL code changes on a whim.
"

The only real reason for GPLv3 is software patents, which didn't exist when the GPL was first conceived. You can't really blame them for having to update it.

Reply Parent Score: 3

RE: why?
by lucas_maximus on Fri 9th Nov 2012 14:25 in reply to "why?"
lucas_maximus Member since:
2009-08-18

Other than licensing issues. GCC has become increasingly buggy with each release.

I have no concrete data, but I do know a few people who make ports for OpenBSD and I have heard some noise from their direction about how it was getting worse.

Edited 2012-11-09 14:27 UTC

Reply Parent Score: 2