12 ms·
FreeBSD Is No Longer Building GCC By Default
- leoh 13y agoI could be wrong, but it really seems to me that this is a very good, but somewhat indirect example of Apple's positive influence in the software world. By relying so heavily on LLVM it seems that they helped push LLVM to more robust maturity. Not something a lot of people talk about when they talk about LLVM ;p.
- Sephiroth87 13y agoThis so many times
- icebraining 13y agoSame happened with Webkit and CUPS. Of course, Webkit came from KHTML, which is GPL licensed, so it's not like they had a choice if they wanted to use it.
- danieldk 13y agoCUPS was already great and widely used in Unices before Apple bought it.
- diminish 13y agoLove - i.e. precursor to affirmative thought - is the maker of everything. It can make Apple the greatest open source contributor, FreeBSD the best Unix and iOS a hero of open source - only because of Webkit-. Just keep loving and imagining, then Android becomes an open source enemy, Gnu and GCC the restrictive alternatives, Firefox a small open source dwarf and FSF the epicenter of the axis of evil. PS: Read all the threads here, and check a few dozens of similar Phoronix articles for-ad-clicks on the same topic on HN.
- patrickaljord 13y agoKHTML was LGPL like all kdelibs, not GPL.
- bad_user 13y agoIf it were GPL (without an explicit exception), they wouldn't have been able to embed it in Safari, without distributing Safari under GPL or something compatible with GPL. KHTML was also pretty sweet already, before WebKit was born, but it lacked the polish ... e.g. web pages weren't rendering properly because KHTML was adhering to standards, whereas Mozilla was adding IExplorer features to make web pages look nice (remember, this was back when "works best in IExplorer" was still the norm). Fortunately for all of us, Mozilla decided against implementing ActiveX (it's a pity that people don't remember these things when speaking of PNaCl or Dart). Unfortunately, WebKit has become in a lot of ways the new IExplorer on mobiles (at least this time it's driven by standards and it's open-source). I hope Mozilla can bring some balance.
- pjmlp 13y ago> Unfortunately, WebKit has become in a lot of ways the new IExplorer on mobiles (at least this time it's driven by standards and it's open-source). Except this is talk about standards and open-source is rubbish, because each mobile device has a different version of Webkit and users only have the version that came with the device.
- gmrple 13y agoI don't really think you can say that. It's not because they did something particularly positive, but more because they did something negative that had positive side effects. A positive externality maybe?
- epistasis 13y agoWhat was the negative thing that had LLVM as a side effect?
- D9u 13y agoI agree that Apple has helped to promote LLVM/CLANG, but I'd rather give the credit to the Unix community as a whole.
- eruditely 13y agoActually I think this point is repeated every time.
- davexunit 13y agoCommence the HN Apple circlejerk once again.
- DannyBee 13y agoThis is a very interesting perspective on LLVM. I don't believe Apple has the most contributors (IE compared to the community as a whole), and i don't think they ever did. They also haven't pushed it as much as you'd think. For example, Apple had precisely nothing to do with Linux or FreeBSD support for LLVM. Now, you could definitely make your statement about clang, but not LLVM itself. Apple deserves a lot of credit for pushing clang forward. On the LLVM side, however, since about 2 years ago, Google has probably has as much impact on LLVM as Apple, and you hear nothing about this, because they don't hold external developer conferences talking about it. (You can count the number of Google presos at recent developer meetings if you want a good indication of how involved they are). Now, of course, in reality, the credit should go to the people doing the work, regardless of where they work, but HN and other places always like to set up these things up as if they are really corporate projects.
- jyap 13y agoUh, quite false in your statements and assumptions. Do you know that Chris Lattner has worked for Apple since 2005? Chris Lattner being the "primary author of the LLVM project".
- DannyBee 13y agoYou are going to have to do better than that. I've known Chris Lattner a very very long time (since before he worked at Apple), and have counseled the LLVM project on various issues since then. I was also involved in mediating the proposals to merge LLVM and GCC that came up, and I watched Chris sell Apple folks on LLVM and get hired. Chris is not a primary author any more, he is a director at Apple. Most of LLVM was not written at Apple, it was written at UIUC (LLVM was started in 2000). While large parts have been rewritten since then, it would be absolutely positively incorrect to say it was Apple's project. I don't even think Apple was the first company to hire people to work on it! Note that Chris doesn't really code much anymore (and hasn't for at least 2 years), given that he has too many people to manage. So, now, if you'd like to point out what statements you think i made are incorrect and your supporting data, i'd love to hear it.
- tedunangst 13y ago
- GalacticDomin8r 13y agoFor a much better source: http://lists.freebsd.org/pipermail/freebsd-current/2013-September/044313.html http://lists.freebsd.org/pipermail/freebsd-current/2013-Sept...
- bdg 13y agoThank you. The mouse-over popup spam was too much to fight with.
- keithpeter 13y agoMay I respectfully mention Firefox and the noscript plugin at this point. Back on topic: I really want to try out a non-linux kernel OS at some point, but I have nvida hardware...
- GalacticDomin8r 13y agoThe proprietary nvidia driver works great on FreeBSD.
- keithpeter 13y agoI'll try an install on my 'play PC' (ancient HP xw6200 with a newer GT520 cheapy card) over the weekend.
- b3n 13y agoFreeBSD has NVidia drivers in the ports tree, I haven't had a problem with them.
- bdg 13y agoThe FreeBSD kernel is cool, but what really sells me on it is the concept of a 'core system' as a design feature, and the nifty things like ZFS that you get. There's a new things that aren't quite like Linux, for instance, the 'watch' command does something entirely different.
- astrodust 13y agoLLVM's license (http://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents http://llvm.org/docs/DeveloperPolicy.html#copyright-license-...) is much more like BSD than the GNU one ever was.
- ajross 13y agoIndeed. Though who cares? A GPLv2 toolchain worked to build FreeBSD for well over a decade and no one died of viral copyleft pollution. And the similar platform that was far more polluted with this stuff ended up being the one that "won" in the market anyway. Of all the good reasons behind switching to Clang (or behind having a two-compiler ecosystem in general), "license purity" is IMHO the dumbest.
- sigzero 13y agoGetting away from the FSF is the best reason.
- vor_ 13y agoI watched a presentation from a FreeBSD developer discussing the switch, and one of the reasons cited was that corporate users would be limited by the GPLv3.
- awda 13y agoThis. As a corporate user of FreeBSD (with conservative lawyers), we're stuck with the last GPLv2 GCC release -- 4.2.2, which is now over 5 years old. Believe me, recent GCC (4.7, 4.8) is worlds better than 4.2. We pine for something better.
- lifeisstillgood 13y agoHoly maloly - your legal department is advising against upgrading the server compiler?! Where do you work :-)
- ajross 13y ago
- harrytuttle 13y agoGreat news! Always good to have some compiler diversity amongst products. I wonder what this will do to the ports tree though!
- markjdb 13y agoClang has been the default compiler for a while now, and many ports either work just fine or have been patched to work properly with clang. Ports that really need to use gcc (those depending on OpenMP perhaps) can still depend one of the gcc ports.
- stekoz 13y agoSome Debian developers are also working since 2012 to bring clang as a better alternative than GCC: http://clang.debian.net/ http://clang.debian.net/
- snogglethorpe 13y ago"Better" in what respect though? Debian obviously doesn't have the licensing issues FreeBSD, Apple, etc., have (whether or not actually justified) with gcc, and technically, clang/llvm is at best a mixed bag, better in some ways, but worse in others. In general, clang compiles somewhat faster than gcc (though the gap has been narrowing) and gcc produces better code than clang (though the gap has been narrowing). Gcc in general supports more architectures. Clang supports some specialized uses (e.g. embedding in an IDE) that gcc (being more of a traditional compiler) doesn't do well. The oft-repeated "error message" argument is fairly specious. Both are changing very quickly, but the trend seems more towards convergence (in capability) rather than divergence. Clang's more modern source-base is arguably an advantage to those wishing to extend it, but that represents a vanishingly small fraction of users—and is not always the advantage that's typically suggested: I've hacked on both, and while gcc's internals can be "elderly", clang's "modern" structure is often far from simple to understand. So, good? Absolutely. "Better"? Er, well. It's a great thing to have two excellent compilers available...
- rwbt 13y agoI wonder how they're getting around the issue of LLVM's lack of OpenMP support. I'm sure there are atleast a few modules in FreeBSD that utilize OpenMP. I too want to switch from GCC to LLVM/Clang but can't right now since LLVM doesn't support OpenMP yet.
- sanxiyn 13y agoCan't those modules simply depend on GCC? FreeBSD is no longer building GCC by default. You can still build GCC as an option.
- jevinskie 13y agoYou won't have to wait for long! Initial patches have already been accepted as of August 27th. http://permalink.gmane.org/gmane.comp.compilers.clang.devel/31340 http://permalink.gmane.org/gmane.comp.compilers.clang.devel/... http://clang-omp.github.io/ http://clang-omp.github.io/
- sanxiyn 13y agoYour link does not show any evidence of this being "accepted".
- emaste 13y agoGCC is still available in the ports tree, and specific ports that depend on being built by GCC (for whatever reason) specify that requirement. This change affects only the GCC that shipped in the FreeBSD base system.
- 4ad 13y ago> I'm sure there are atleast a few modules in FreeBSD that utilize OpenMP. Nothing in the base system uses OpenMP. I find your assumption extremely bizarre (and scary). The kernel and the base system is the kind of software OpenMP would not be of any use. In fact, the base system is not even written in C++, but C; the only C++ components are groff and llvm (go figure). $ lsr /usr/src/ | egrep '\.(c|cpp|h|hpp)$' | xargs egrep '^[[:space:]]*#[[:space:]]*pragma[[:space:]]+omp' | grep -v gcc | wc -l 0 Non-base software from the ports systems uses its own compiler. The system compiler is used for compiling FreeBSD.
- sanxiyn 13y agoRe: OpenMP Intel is working on OpenMP support for LLVM/Clang. Runtime part http://www.openmprtl.org/ http://www.openmprtl.org/ is BSD. Compiler part http://clang-omp.github.io/ http://clang-omp.github.io/ is the same license as LLVM/Clang. OpenMP is a large feature, so it will take quite some time to be integrated.
- ianstallings 13y agoRelated topic, LLVM vs GCC performance: http://www.phoronix.com/scan.php?page=article&item=llvm_clang33_3way&num=1 http://www.phoronix.com/scan.php?page=article&item=llvm_clan... I guess if it's a big deal you can always compile gcc. Honestly I'd rather have it compiled for me but that's probably no surprise.
- pestaa 13y agoI always had the notion that LLVM is faster than GCC. I don't feel qualified to interpret this benchmark comparison, but they appear to have roughly the same performance?
- CJefferson 13y agoLLVM compiles faster than GCC (although the gap has narrowed in the last couple of years). GCC produces faster code than LLVM (although that gap has also narrowed)
- riotingpscifis 13y agoLLVM compiles faster as it optimises less (oversimplified of course).
- tjaerv 13y agoThis recent presentation from the 2013 European LLVM Conference outlines the optimization issues LLVM still suffers from, making the produced binaries up to ~10% slower than with GCC for some use cases: http://llvm.org/devmtg/2013-04/#talk3 http://llvm.org/devmtg/2013-04/#talk3
- stock_toaster 13y agoRight, but there are license concerns (gpl3) impacting inclusion of gcc > 4.2 for many of the BSDs. FreeBSD is still using gcc-4.2 I believe.
- nullc 13y agoSeemes kind of odd to fixate on a self-contained copyright license (The license of GCC doesn't impact the code compiled with it) while at the same time the LLVM/Clang contributors are not required to release their patents for use, and some (many?) of them are filing patents on techniques they use in LLVM. To me it seems that they are ignoring an important practical concern (usage of LLVM/Clang may be unlawful in the US and Europe without going out and obtaining patent licenses) in order to address a purely philosophical issue with no practical impact. It's sort of amusing how the tables have turned over the last twenty years. Twenty years ago it was the FSF/GNU crowd who was making impractical decisions for philosophical/political reasons. ... and as time has gone on the practical importance of strongly free software has become greater and greater.
- kingmanaz 13y agoI was excited about PCC when the project was revived a couple years ago, hoping it would become the default compiler for the C++ and GPL phobic OpenBSD. The compiler does not appear to have made much progress in the last couple years, unfortunately. Perhaps clang will carry over to OpenBSD so the project can ditch their custom version of GCC. PCC, with its few moving parts, does seem to embody the OpenBSD philosophy more than LLVM, though.
- tedunangst 13y agoJust as soon as someone adds vax, sh4, m88k and hppa backends...
- indeyets 13y agoI guess you were thinking about NetBSD ;)
- tedunangst 13y agoI'm pretty sure OpenBSD runs on all of those architectures.
- asdasf 13y ago>The compiler does not appear to have made much progress in the last couple years, unfortunately. It was recently removed in fact. There's been talk about adopting LLVM, but it doesn't support a bunch of architectures openbsd does support.
- gdonelli 13y agoHonor to Apple for pushing this clang forward, together with WebKit clang is probably one of the most significant contribution to the open source community to date.
- octo_t 13y agoI'd disagree and say in terms of significant contributions, Firefox has made the biggest impact, not just on the computing world but in general social terms.
- oijaf888 13y agoMore so than android?
- Arelius 13y agoI'd say so.
- bskap 13y agoAndroid has gotten more people running open source software, but it hasn't done much to improve the ecosystem. There's not much coming back upstream other than some kernel updates.
- coldtea 13y agoSure. Android is basically Linux with a proprietary GUI and a riped-off of Java runtime. Plus, it's mostly used for proprietary mobile device offerings by big corporations. Not many open source projects benefit by Android's existance.
- rsynnott 13y agoDepends how you mean it, really. Android has had an impact, and happens to be open-source (albeit not operated like a normal open-source project; it's closer to a code-dump, as with Apple WebKit in the early days). However, if Android was not open-source, but had source shared with OEMs, would its impact really have been substantially different? I suspect not. However, if Mozilla, clang or WebKit had not been open-source, their impact would have been very different (and much less).
- moron4hire 13y agoThis was well known to be coming.
- oscargrouch 13y agosince it looks that linux won now, with big players maintaining it and a great ecosystem, i think the hackers love should all go towards FreeBSD now.. its a great OS, with a great background that should advance forward as another good open source option to linux and also against the closed source OS´s all around.. after all the heroic efforts from the FreeBSD community, to make the project going on even without the same support and attention that linux got, i wander if its not the time right now that this wonderfull OS start to get more traction and love from the hacker community?
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- eruditely 13y agoPeople tend to improve what they use, or want to use?