7 ms·
It's really cool that the FreeBSD project is investing into llvm like this, seems like a good bet for the future. But why so soon and so earnestly?
by Jonanin 14y ago
It's really cool that the FreeBSD project is investing into llvm like this, seems like a good bet for the future. But why so soon and so earnestly?
- fusiongyro 14y agoThe GPLv3 is why. The current C compiler in FreeBSD is GCC 4.2, which is what, seven years old? They can't use a more modern one because they're all licensed GPLv3 which is incompatible with FreeBSD's base system. Clang has a more liberal license. As I recall, this is also why Apple switched to Clang (though there were many side benefits for Xcode).
- ConstantineXVI 14y agoIt's worth noting that Apple developed Clang in the first place[0]. [0] http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-July/009817.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-July/009817....
- fusiongyro 14y agoCool, I didn't know that.
- aaronblohowiak 14y agoClang, yes, but llvm was started in 2000 at the University of Illinois at Urbana–Champaign, 7 years before clang (the c front-end) was open-sourced by Apple. Chris Lattner, one of the original LLVM people developed Clang at Apple, and Apple has been quite nice to llvm + clang =D
- fafner 14y agoWhy can't they use GPLv3? The FreeBSD license is compatible with GPLv3. http://www.gnu.org/licenses/license-list.html#FreeBSD http://www.gnu.org/licenses/license-list.html#FreeBSD Apple doesn't want to use GPLv3 because of the patent clause.
- loumf 14y agoI believe "compatible with GPL" on this page means that it can be included in a GPL distribution, not the other way around.
- fafner 14y agoBut they had no problems shipping GPLv2 software.
- Someone 14y agoIf you were the only one in possession of oxygen I would buy it from you, but that would not imply that I had no problems with the idea of buying oxygen. Also, the difference between GPL2 and GPL3 is large enough for many BSD backers to be of concern (the anti-Tivoisation clauses mean that one cannot close down firmware compiled with a GPL3'd version of gcc if it contains even the tiniest part of libc. Possibly, even using some of its macros in your code would be enough to require you to make your software GPL3. We won't know until this has been to court, but why take the risk?
- fusiongyro 14y agoHey, it's not my call. http://unix.stackexchange.com/questions/49906/why-is-freebsd-deprecating-gcc-in-favor-of-clang-llvm http://unix.stackexchange.com/questions/49906/why-is-freebsd...
- ajross 14y agoIt's not a legal incompatibility; FreeBSD has never shipped modified GPL software anyway to my knowledge (beyond things like patches to cleanly-separated ports that can be distributed independently under the GPL). It's a philosophy thing. The new provisions in the GPLv3 (principly the counter-tivoization requirements which prevent shipping integrated devices without reprogrammability) are seen as unacceptable to the FreeBSD team. So they simply ruled against the license, which means that recent versions of gcc are unusable and they need to look elsewhere for a modern compiler. That's the official answer. The cynical answer is that they've always hated the FSF and their dependence on GNU software, and are finally jumping ship now that there's a non-copyleft compiler available for them to use.
- kkowalczyk 14y agoYou mean only after 10 years since llvm has started and only after Apple has switched XCode to clang?
- ajross 14y agoXCode is a solution for app development only. Occasionally I dig around looking for quotes, but AFAICT Apple has never claimed they're using clang for all of iOS and OS X. I suspect most of the internals are still built with gcc. Does anyone have evidence either way?
- kryptiskt 14y agoFrom Chris Lattners resume(http://nondot.org/sabre/Resume.html http://nondot.org/sabre/Resume.html): "Apple shipped the Mac OS X 10.8 and iOS 6 releases, and they were built virtually entirely with Clang - llvm-gcc is obsolete." Another interesting thing: "We invested major effort into compiler implementation and tuning for the custom Apple CPU design known as the "Apple A6". The exceptional CPU performance of the iPhone 5 was a result of a joint effort between the Apple silicon and LLVM teams."
- ajross 14y agoGood quote, but that "virtually" is interesting. What parts are still using gcc? And is the interpretation that everything using the LLVM backend and not the GNU one? The A6 quote doesn't mean much. All compilers work hard on device-specific optimizations; you can find similar press releases from Intel every few months.
- ryanpetrich 14y agoThe components of iOS that are written in C, C++ and Objective-C are all compiled with Clang. The few components that are written in other languages are not.
- bdash 14y agoI believe the non-LLVM backend to GCC was removed from Xcode 4.2, which was released in October 2011.