Linked by Thom Holwerda on Mon 14th May 2012 13:55 UTC
FreeBSD "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.
Order by: Score:
GNOME and Linux
by robmv on Mon 14th May 2012 14:54 UTC
robmv
Member since:
2006-08-12

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

Reply Score: 2

RE: GNOME and Linux
by cfgr on Mon 14th May 2012 15:23 UTC in reply to "GNOME and Linux"
cfgr Member since:
2009-07-18

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

Reply Score: 4

RE[2]: GNOME and Linux
by dsmogor on Mon 14th May 2012 15:32 UTC in reply to "RE: GNOME and Linux"
dsmogor Member since:
2005-09-01

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.

Reply Score: 2

RE[3]: GNOME and Linux
by cfgr on Mon 14th May 2012 16:11 UTC in reply to "RE[2]: GNOME and Linux"
cfgr Member since:
2009-07-18

The point is whether you have resources for that.
You can propel indefinitely good architectures only if you have infinite experienced developer input.


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.

Reply Score: 1

RE: GNOME and Linux
by Valhalla on Mon 14th May 2012 16:21 UTC in reply to "GNOME and Linux"
Valhalla Member since:
2006-01-24

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.

Reply Score: 3

Comment by Drumhellar
by Drumhellar on Mon 14th May 2012 14:56 UTC
Drumhellar
Member since:
2005-07-12

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.

Reply Score: 3

RE: Comment by Drumhellar
by moondevil on Mon 14th May 2012 16:14 UTC in reply to "Comment by Drumhellar"
moondevil Member since:
2005-07-08

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.

Reply Score: 3

Comment by gan17
by gan17 on Mon 14th May 2012 16:02 UTC
gan17
Member since:
2008-06-03

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

Reply Score: 2

RE: Comment by gan17
by Valhalla on Mon 14th May 2012 16:45 UTC in reply to "Comment by gan17"
Valhalla Member since:
2006-01-24

The Clang Compiler might not be as rich as GCC (with GCC's performance guided optimizations and such)

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.

Reply Score: 2

RE: Comment by gan17
by Doc Pain on Tue 15th May 2012 09:11 UTC in reply to "Comment by gan17"
Doc Pain Member since:
2006-10-08

They were still stuck with GCC 4.2 on FreeBSD (due to later versions being GPLv3), weren't they?


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.

Reply Score: 3