“The intent is to switch on this option by default rather sooner than later, so we can start preparing for shipping 10.0-RELEASE with Clang as the default system compiler, and deprecating gcc.” Good to see Clang/LLVM continue to gain as much steam as it does. This will only make GCC better.
God for them, another good compiler is good for everyone. I only wish that when GNOME (and other DEs) start talking about better integration with Linux kernels and systemd and other GPLs technologies, BSD people do not start to cry because those teams want it.
They want a compiler compatible with their license that will allow it to be better integrated with their code (IDEs, static analysis, etc). I want better integration of my desktop with the underlying OS
Requiring dependencies on optional components (what does the boot process have to do with a desktop?) is typically a sign of a bad software architecture.
A better design is modular so that you can add extra functionality on Linux but still keep it operational on other systems as well (either without that specific functionality or with a similar one specific to that system). Having a hard requirement is just lazy and such an attitude typically leads to code that is less stable, harder to maintain and more difficult to adapt if systemd is replaced by the next best thing.
From my own experience, keeping cross platform/compiler compatibility is a good thing even if you care about one platform only. Not just from a programming point of view, it also keeps options open for the future.
Edited 2012-05-14 15:29 UTC
The point is whether you have resources for that.
You can propel indefinitely good architectures only if you have infinite experienced developer input.
I don’t have any study at hand but the gut feeling is that Linux desktop developer supply have gotten quite a blow recently that one could attribute OSX and IOS popularity.
With limited resources at hand and tougher than ever competition (from both MS and Apple) that threaten putting all those efforts on brink of irrelevance, tough decisions have to be made.
Perhaps, but in this case they did get the developer feedback. If they don’t get the architecture right now, they will risk bloat by spaghetti code in the long run and it will be that much harder to switch away from systemd.
Building a correct architecture is easy, the real difficulty lies in having a vision and planning ahead for possible scenario’s and changes that may impact that architecture. Things that are overlooked now, will cause trouble later. That’s why it’s a good thing that non-Linux developers are alarmed about the hard dependency. Now is the time to get things right without too much hassle.
Yes, due to not being able to ship GPLv3 licenced code (due to the wishes of their corporate sponsors iirc) they’ve been stuck with GCC 4.2 (just like OSX) which is really old. That, together with Clang/LLVM sharing their licence made it an obvious move.
Their transition to Clang/LLVM has been ongoing since 2009 and now it’s going to happen in the 10.0 release which shows that Clang/LLVM now has matured sufficiently to be shipped as the default compiler.
I think it’s great that we have both these compiler toolchains (I use both) and their friendly competition and respective strengths means we have more possibilities and better tools available in the open source ecosystem.
Let the BSD vs GPL war begin!
Seriously, though, this is a cool move. Clang doesn’t always generate the fastest code (But, it can at times), but the speed it compiles is great.
I mean, less than 45min to complete a make buildworld is just ridiculous.
Generally speaking I never worked on a C or C++ project that had compile times for make world lower as 1 hour, even with parallel builds.
So is the beauty of enterprise software coupled with the archaic C based toolchains, without module systems.
I really appreciate the improvements Clang brings to the table.
They were still stuck with GCC 4.2 on FreeBSD (due to later versions being GPLv3), weren’t they?
If that’s the case, then it pretty much makes sense for them. The Clang Compiler might not be as rich as GCC (with GCC’s performance guided optimizations and such) but I suppose the current version is better than the 4 year old version of GCC they’ve been stuck with.
Then again, I’m no programmer, so don’t quote me on anything.
Edited 2012-05-14 16:02 UTC
Well unless I’m mistaken there’s a GSOC project for profile-guided-optimization this year and hopefully it will lead to Clang/LLVM having this later this year.
It also lacks openmp support though, and for me it generally generates ~10-15% slower code at -O3 than GCC, it supports far fewer architectures and languages aswell.
However it has better error reporting and is faster at compiling, and LLVM is used for lots of jit engines and backends etc which is (imo) where it really shines as a very strong framework.
Again, I don’t want to be without either as they have their own respective strengths.
This is only for the base system which aims to be fully BSD-licensed. Newer GCCs can always be installed from the Ports Collection in order to compile additional software (e. g. such that requires GCC 4.4). The base system (also read: the operating system) intends to use a well-tested and reliable compiler. Of course, licensing aspects also apply. Bringing Clang into that position would benefit many aspects: speed, evolution, licensing. It has proven to deliver good work in terms of stability, and that’s a main criteria for the compiler being responsible to turn source code into a powerful operating system.