The Apple way - LLVM
There is a very interesting discussion
on the Fedora devel mailing list about LLVM and GCC compilators started with short reaction on Apple's migration to LLVM
in their Xcode development environment. The original author asks
if llvm is ready to do same for several important linux packages.
Fedora developers were confused with that statement asking what is the point
. Matthew Garrett pointed out
there are already some packages in Fedora which are being built with LLVM, but there is no plan for whole migration to LLVM. Also because the kernel does not support it by default. And that was the starting point, Rahul Sundaram
plays with the idea:
LLVM can be used to build the kernel and what Linus does doesn't matter as much (kernel is important but only one component) as showing that Fedora on the whole will actually benefit from moving to LLVM. For that, LLVM has to so much better than GCC and someone has to do the work within Fedora to show that it is the case.
Developers agreed on the opinion Apple is trying to avoid GCC because it is licensed under GNU GPL while LLVM has much more permissive BSD one. Somebody linked recent changes in the CUPS printing subsystem which are inappropriate for Linux, but Apple is now paying the lead CUPS developer. But this is nothing unusual, even Red Hat is able to put strong direction for software under their control. The good thing it is still open-source software - everybody can fix, patch, fork. Some pople hate forking, but belive me, it is so natural open-source process. By the way nobody forked CUPS - there is no reason to do it right now.
The most interesting reply is not about licenses, but rather about quality:
The another usual mistake when people compare speed of GCC and LLVM is to use -O2 for the both compilers. But the true is that -O1 of GCC is -O2 of LLVM with the point of code generation quality. The compiler speed of GCC with -O1 is the same as for LLVM with -O2. You can find the latest comparison of LLVM and GCC on http://vmakarov.fedorapeople.org/spec/ (see 2011 comparison at the bottom of the left frame).
What we see here is a Phoronix effect. Michael, the Phoronix author, created extraordinary open-source test suite (Phoronix Test Suite - PTS) and he writes lots of interesting articles. His work are inestimale for the community - for example tracking those regression bugs really helped to give it poppularity and I really appreciate what he does. +1
On the other hand, he runs an e-zine. He writes about things that people follow. One example is LLVM. So many articles about this awesome technology, so many graphs. People start to think LLVM performs better than GCC. Plain truth? It is not.
Apple creates awesome things. But awesome things are not always the best things.