8 ms·
FreeBSD 10 to use Clang, GCC will be deprecated
- Sicp 14y agoWAT.
- unimpressive 14y agoWheres the "WHAT?!". The BSD guys have gone on record multiple times saying that they think that RMS and GNU are a joke. It seems natural that they would try and phase out GNU when possible in light of this belief. An example: http://openbsd.org/lyrics.html#43 http://openbsd.org/lyrics.html#43 You can even download an MP3 or Ogg of it being sung (With backing.) by Nikkos Diochnos.
- lysol 14y agoIt makes perfect sense if you distill it to just a licensing issue. No wat needed.
- lhnn 14y agoThat's a pretty scathing critique.
- unimpressive 14y agoFor bonus points, in the actual recording they note that Hypocrites "Smells like thousand year old goat cheese.". which no doubt refers to Stallmans's legendary hygienic practices. [0] Needless to say, the BSD guys aren't really fans. [0]: http://www.youtube.com/watch?v=I25UeVXrEHQ http://www.youtube.com/watch?v=I25UeVXrEHQ
- suborbital 14y agoI am surprised you didn't bring up monkey gate & security taking a backseat.
- diminish 14y agoYea, most BSD guys I know are also fans of Apple; iOS and Macs on desktop rather than GNU or Linux and Clang is supported by Apple for license reasons.
- copx 14y ago..and a big lie. >Richard felt that this "ports tree" of ours made OpenBSD non-free. He came to our mailing lists and lectured to us specifically, yet he said nothing to the many other vendors who do the same; many of them donate to the FSF and perhaps that has something to do with it. See here for example: http://www.gnu.org/distros/common-distros.html http://www.gnu.org/distros/common-distros.html Stallman and the FSF apply the same standard everywhere. He rejects Red Hat (a major GNU sponsor) as "non-free" just like OpenBSD, in contrast to what the BSD guys claim. >Richard has personally made sure that all the official GNU software -- including Emacs -- compiles and runs on Windows. What?! Most official GNU software does NOT run on Windows.
- swa14 14y ago">Richard felt that this "ports tree" of ours made OpenBSD non-free. He came to our mailing lists and lectured to us specifically" to complement this story a little. rms had heard from one source or another that OpenBSD was "completely free" too (probably based on their hard and much appreciated work on wifi drivers and blobs), and looked into the matter to see if it could be included in the list of FSF endorsed operating systems (which thus far have only GNU/Linux systems). He found references to non-free software in the ports tree and wrote to the openbsd mailing list to ask for clarifications. There were actually a few saner voices who politely stated that was the intent and that OpenBSD as a project had a different definition of "free" and as such should not be included in the officially endorsed FSF-list. Of course, for the less stable elements, it was a good pretext to scoff and insult the the man. Some even riled on and created a song about it. OpenBSD is a fine operating system, but for a normal person the culture around it can be quiteoffputting.
- samuel1604 14y agoThanks for the clarification nothing like a out of context FUD!
- fdr 14y agoHm. That example is entertaining and creative, but not really consistent with the actual viewpoints of the FSF[0]. Choice statement: > Distributing free software is an opportunity to raise funds for development. > Don't waste it! Redhat is a good example of a company doing well distributing free software and making money doing it; it's just that the typical shrink-wrap license business model doesn't fare so well when copying and modifying the distributed program is allowed and protected. Also, I don't mean to implicate that you share beliefs with the OpenBSD people, since you are merely reporting on their position -- accurately, in my mind. But I thought this is an interesting bit of related information for the discussion. [0]: http://www.gnu.org/philosophy/selling.html http://www.gnu.org/philosophy/selling.html
- swa14 14y agoYou must mean the OpenBSD guys. FreeBSD is pretty much neutral on the GPL, but BSD licensed software is sort of their "thing", so it's natural they'd prefer a BSD licensed compiler. NetBSD used to be pretty hostile until control was wrested from wasabi systems which disliked the GPL because it prevented them from closing down GPL software. Dragonfly never really took a position, so it's safe to assume they're neutral too. That leaves only the OpenBSD guys, of whom (some of) the vocal part thinks anything not OpenBSD is a joke. I think that's a bit more of a qualifier than "The BSD guys", most of which don't particularly care about phasing out GNU (even though that happens when accumulating BSD licensed software in their OS), some of which are sympathetic but simply like BSD systems more, and what seems to be a fringe minority which is actually hostile for one reason or another.
- Turing_Machine 14y agoI haven't been following C much in recent years, though I knew that Apple had switched. Someone want to give (or link to) a brief rundown of the advantages/disadvantages?
- MBCook 14y agoThere is a little bit on the Clang site: http://clang.llvm.org/comparison.html#gcc http://clang.llvm.org/comparison.html#gcc Outside the license, the main benefit seems to be that in Clang the different stages are less intertwined than GCC. This is supposed to make developing Clang easier (since you don't have to understand so much), allowing optimizations to be tested and added easier. On the user side, Clang is well known for providing much better error messages. Some error messages will even suggest possible fixes (you might get something like "Can't assign a pointer to a something, did you mean *pointer?"). The GCC guys have been improving their compiler for a long time, and over the last few years they have been working hard to make GCC easier to work on and optimize. I believe that GCC is usually faster or the binaries are smaller by a few percent, but it's not generally a drastic difference.
- supar 14y agoGCC speedup is actually quite substantial in math/numerical code (which, in turn, is not as fast as Intel's ICC). Moreover, GCC supports OpenMP, whereas Clang does not. This alone make building several scientific software packages not possible with Clang. It's important to note though that it has only been recently (starting with GCC 4.4) that I've started to see some _improvement_ over previous GCC versions. GCC 3.x was known to be bloated, buggy and emit poor code for almost every architecture. Open64 was superior in _all_ regargs up to GCC 4.2/4.3 in my opinion. Clearly, the whole project greatly benefited from Clang's competition.
- gillianseed 14y agoAgreed. Competition is GREAT, and seeing these two excellent open source compiler offerings engaging in friendly competition means we as end users all benefit, no matter which solution we prefer (or use both, as I assume I'm not the only one doing).
- maxharris 14y agoI'm excited about this change. I was working on a C++ project last summer that had a lot of templates. Clang was a lot faster, and a lot easier to use.
- TwoBit 14y agoWe have been using clang on Apple, Linus, and FreeBSD. It's a lot nicer to work with and compiles faster than GCC, including 4.7. As people point out, the generated code is on average a little slower.
- quink 14y ago> Linus Linus' ultimate plan for Linux. Replace brain with Linux. Circle complete. Spleen still uses binary blob for driver. Open-source attempt to recreate it called Splouveau.
- harshreality 14y agoWe have been using clang on ...Linus... clang, now with a compile-to-DNA backend.
- javert 14y agoNo, I think he's saying Linus is a robot. A robot whose software is compiled with clang. That implications are disturbing.
- soc88 14y agoAren't they pretty much doing anything these days to make it easier for Apple to “steal” their code, considering that most consumers of BSD code are Apple users?
- Peaker 14y agoApple isn't stealing if BSD is explicitly giving it to them for free. FreeBSD apparently have no issues with donating their work to corporations.
- Derbasti 14y agoThat is precisely the point of the BSD license: Give freely to everyone.
- drostie 14y agoAs someone who tends to release on more-permissive licenses, I just want to clarify the causal model here. It's not "doing something extra" to release with BSD; the "doing something extra" comes when you want to properly release with GNU. After a long random walk over the licensing attitudes graph, I have found myself for the last several years stably located at one node. This node is, "licensing is about lawsuits." People often release with the GNU GPL because licensing, for them, is not about lawsuits but has some other import and use -- perhaps moral. But for me, a license is strictly about defining what sorts of lawsuits are possible. Copyleft is a threat to sue. More precisely, it is the threat "I may sue you if you don't threaten to sue others." And that just sounds crazy. Why would you do that? Well, the stated goal of copyleft is to eliminate all fears of lawsuits by using legal threats. Let me hasten to add that this is a very pretty idea. If you know the religions of India, this idea is called tantra -- that sometimes the most precise tool for removing a thorn is other thorns, or sometimes the best way to remove dirt from your clothes is with an abrasive substance -- like other (cleaner) dirt. The reason that Stallman is sometimes described as religious may come back to the attendant mysticism that tantric approaches usually bring with them. My point is, this sort of thinking is an active choice and requires you to enforce the threat, at least in principle. The BSD license is much simpler: it says "I won't sue you, and you're not allowed to sue me." It is a Buddhist-nonviolence approach to eliminating lawsuits: "I have stopped causing suffering in this world, Angulimala -- now why don't you stop?" It is nothing extra to release this way: you simply promise to not sue anyone, and you only give permission conditional on the fact that they will not sue you, you write it once and then it is done. It's clean and elegant. If you want to actually be a productive GPL licenser, you have to either hope that the threat in the docs is enough, or else find everybody who is "conveying" your software, and slap them with a lawsuit so that they learn how much lawsuits suck.
- mrich 14y agoI have been working on getting a quite complex C++ code base (3M+ LOC) with heavy template use to compile on clang. Along the way, I have found many violations of the C++ standard that GCC silently accepts, several obscure GCC features that clang does not support, and up to now filed three clang bug reports. The project compiles now, but the resulting executable is still not passing basic regression tests :) I think our codebase has been depending for too long on just one compiler, and clang C++ support isn't perfect yet. (FreeBSD has mostly C code which is very stable). I will keep pushing to get it all working :)
- raverbashing 14y ago"many violations of the C++ standard that GCC silently accepts" Or maybe it's C++ violations that are "commonplace" and would break several existing softwares. And herein lies the biggest hurdles with C++ Heavy templating and inheritance is the way to ensure your C++ program will be unmaintainable and not forward compatible with GCC (or other compilers) I've been in a similar situation where I spent a lot of time fixing compiler errors (on GCC 3.X if I'm not mistaken) that would be ignored on 2.X
- maybird 14y agoI'm in the same boat. A large code base relying on GCC and Boost heavily. The code builds with Clang, but the runtime crashes deep inside Boost. It's been very frustrating because we're well past the point where refactoring-out Boost would be cost effective.
- jpdoctor 14y ago> It's been very frustrating because we're well past the point where refactoring-out Boost would be cost effective. I'm curious: What was the motivation for switching in the first place? And why is staying with the proven tool not the better option? My own case: It makes no sense to migrate our (relatively small by the sound of it) codebase. It is in production, generating money, and anything that interferes with that is simply not going to be considered. Our largest dependencies are wxWidgets, ffmpeg, libcurl: It has performed well, though not without some hiccups.
- mp3geek 14y agoWould be interesting to see benchmarks with GCC vs Clang in FreeBSD