FreeBSD 10 To Use Clang Compiler, Deprecate GCC
An anonymous reader writes "Shared in last quarter's FreeBSD status report are developer plans to have LLVM/Clang become the default compiler and to deprecate GCC. Clang can now build most packages and suit well for their BSD needs. They also plan to have a full BSD-licensed C++11 stack in FreeBSD 10."
Says the article, too: "Some vendors have also been playing around with the idea of using Clang to build the Linux kernel (it's possible to do with certain kernel configurations, patches, and other headaches)."
What's wrong with GCC?
Having all this great open source compiler technology competing with each other is great, but one does wonder if the alienation caused by GPLv3 was worth it, as it is the primary reason both Apple and FreeBSD embraced Clang (in fact, Apple started the Clang project). As a result, GCC wasn't updated past GPLv2 on either platform. Apple couldn't integrate GCC with their IDE like they wanted, nor could FreeBSD's commercial clients work with it. Flexibility and pragmatism usually wins out over rigidness and ideology.
One of the FreeBSD developers gave a talk about this. FreeBSD has commercial users, and the new GCC just wouldn't have been an option for them. The older license-compatible version still in FreeBSD wasn't receiving updates, and it was beginning to affect developers too greatly.
Whether this compiler switch is a good thing or not depends on how much you hate the idea of commercial vendors using open source. GCC's strictness is admiral from an ideological perspective, but certainly not from a practical one. It should be noted that even Linus Torvalds adheres to a more pragmatic worldview:
There are "extremists" in the free software world, but that's one major reason why I don't call what I do "free software" any more. I don't want to be associated with the people for whom it's about exclusion and hatred.
It's pretty damning when Linus himself no longer refers to Linux as free software because he doesn't like the extremism of the free software movement. And why should he? He's an engineer, not a religious fundamentalist.
It's not quite as simple as that. The development of Clang is being funded by Apple. They need a BSD license so that they have the freedom to make further modifications down the line (without leaving them open). Yes, I'm a GPL advocate. No, I don't agree with Apple's ideology. But it's the case anyway.
In any case, it doesn't do us any harm to have an underdog in the world of open source C compilers. If you only have one option, then people start treating even the programme's eccentricities as standards. The need for compatibility encourages people to document. Not to mention that the different attitude taken in Clang from the offset means that it may be more suitable for certain applications. This page makes for some interesting reading.
--
I've found that code that will compile properly under a variety of compilers tends to be of better quality.
One of my current projects started out on an old 2.x branch of GCC. When I finally got around to updating to a current GCC, I had to fix quite a few bugs before it would actually work - the different compiler was catching problems I hadn't noticed before.
Same when I tried compiling it under Visual Studio, or Clang - the more compilers I made it work under, the less bugs there were in the code.
Now, if a given program actually uses some special feature of GCC, that's fine - if only one compiler will do what you need, that's fine. Or if it's too much work to maintain a "port" - I stopped maintaining the VS project files a while ago, since I no longer used it. But if you have a chance to at least test it against a different compiler, go ahead and give it a shot.
There's a reason even the shining monument of GPL (Linux) uses GPLv2...
Even if Linus did want to move the kernel to GPLv3 (he doesn't), he would have to get every kernel contributor to agree to the license change, AFAIK.
Do what thou wilt shall be the whole of the Law
Complaining about the GPL
He wasn't complaining about the GPL, he was stating (correctly) that it is one of the key reasons some groups choose not to use GCC, particularly GPL version 3 (note that FreeBSD has not used and of the recent GCC release specifically for that reason - they were fine using GPLv2).
It is a case of choosing the right tool for the job. Until recently their choice was to redefine the job (change the parts of their projects and licensing policy that GPLv3 conflicted with), keep the old tool (using older, GPLv2 licensed, releases of GCC only), or use something less stable/proven/compatible. They chose the middle option. Now option three is replaced by "use something else that is now stable/proven/compatible enough to be an alternative" they have taken that choice. Again this isn't complaining about GPLv3, it is simply refusing to use it because it is incompatible with some of their chosen goals.
I'm told there are technical reasons why Clang and the related tool chain are preferable to GCC in some circumstances too, though I'm out of the loop on that one so I don't know what they are or if they are significant to FreeBSD.
While his answer was rather terse and it would have helped to be less so (it made him appear to some, to you at least, like an anti-GPL troll), what you appear to have done in your response is set up a strawman to attack. This is the sort of thing that anti-GPL people (both within the open-source arena and external to it) will jump on as "proof" that GPL advocates are rabid loonies, so by defending the GPL in such a manner you may be harming the cause rather then helping it. You might want to be more careful not to come across that way (it may not have been you intention on this occasion, but it does seem that way by my reading).
Many people wants _real_ freedom for their software
No, they don't. If they did, they'd use GNU GPL v3.
But I think you mean the opposite of what you said: people want to be free to do whatever they want with the software, including taking away the software's freedom.
That's the thing. Free software is not about your freedom, it's about the software's freedom. It is not for the benefit of anyone in particular, it is for the benefit of the whole humanity. When you think about where rms came from, and when you read his writings, you realize that his ideal is not an indifferent "here's some code, use as you wish". It is an ideologically grounded "here's some code, it's for everyone to use, and if you build upon it, the result is also for everyone to use".
Circumcision is child abuse.
We don't have to guess which model works best, at this point we have historical data. Your model failed with respect to X. MIT created and maintained an X that they released via. the MIT license. All the UNIX vendors then took this MIT code and intermixed it with their custom code creating value add X's that were specific to their platform, and closed source. The effect was that the X that existed in the public domain was worthless for end users, and the X's that were worthwhile were closed. X itself couldn't progress because it fragmented so all the interesting stuff existed in other layers. Years later when there was a desire for a workable open X, the XFree86 project had to start, essentially from scratch and this took years. We still haven't gotten all the features that existed in those proprietary Xs 2 decades ago.
That is the classic example of why BSD style licensing doesn't work. The primary maintainer is not unchanging.
Conversely the GPL has a long history of successful multi corporate contributions over time. The historical data simply refutes your theory of what should work.