by hosay123 · 13y ago · 0 comments
There is a vast body of consumers who care more about maturity and stability than a few convenient front-end tricks, which the majority of C++11 ultimately amounts to. As for whether GCC is somehow "too far gone" to catch up, well that's just nonsense, the core technology has barely changed in 10 years. Things will improve when commercial needs arise and as eager PHDs hunt for final year projects.
While ancient, there is immense diversity in GCC's configurations, and AFAIK its code generator still maintains an edge over Free alternatives. Of the purported speed improvements elsewhere, anecdotal evidence from my Macbook suggests LLVM is slower at building smaller projects (predicted long ago by smart types that knew LLVM was only fast because it lacked features).
It's worth noting that GCC already supports significantly more C++11 than either MSVC11 or ICC, although this article makes no such comparison. Like the majority of articles from Phoronix, this one is blinded by the new hotness (LLVM) and a generally superficial appreciation of the subject matter.
The only thing that could stop it is if it's no longer an FSF-run project, or the steering committee actually started replacing older members with people still working on GCC, or something else drastic. This would enable folks to do things that currently take a lot of energy to fight about. It may also have to compromise some core values in order to serve the most users.
Yes, LLVM currently lacks optimizations GCC has. But LLVM will do the same thing GCC did to commercial compilers when we started the tree-ssa project, and cherry pick the high end of research, and implement it (it has already started).
As long as GCC stays on the path it is, it will die. It will be a long time, because it has a lot of users. LLVM is friendlier to developers, researchers, and users. GCC can't win any fight as long as that is true.
FWIW: I also don't think most GCC developers harbor any illusions about the above. I think RMS may, or may not be involved enough to care, but nobody seriously involved in GCC thinks that GCC is in "a-ok great shape no problems"
The other possibility, of course, is that LLVM will end up on the same path GCC does, and thus, they will be on the same terms again. I doubt this, since Chris Lattner saw what happened when he tried to merge GCC and LLVM, and despite his flaws, is much more savvy about politics and community policies than GCC is.
A lot of discussion of this proposal happened offline. The end result was basically that Chris withdrew it (though not formally), though GCC would have rejected it anyway.
GCC was mostly unwilling to throw away what they had (nobody was really up for rewriting everything again), and Chris realized it would be a disaster to his community. Imagine trying to unify the stereotypes of the ruby and python communities, or something like that (i use this only as an example of the level of difference in ideologies between the GCC and LLVM communities)
In practice, this was probably the right social outcome given the set of developers/people involved on both sides. From a pure technical perspective, it's much harder to say.
GCC is stagnant, but the dynamic pace of development on the Clang front means that either the GCC developers will adapt, or the community will adapt GCC for them.
For one, there wasn't any viable competition at the time. Your options were GCC, or a commercial compiler. If you actually needed access to the source code of the compiler for any reason, GCC was your only option.
So, when it became clear that the FSF and the community wanted to take GCC in different directions, the obvious choice was to fork GCC. The fork developed far more rapidly than the original, draining developer time (and users, for that matter) from GCC mainline. Basically, at the point where the FSF anointed egcs as the new GCC, the original GCC project was already dead.
Things are a bit different nowadays.
There are already disagreements between what people wanted to do with GCC, and the FSF. Especially around the tool support the article talked about - the FSF are against reorganizing GCC so that parts can be used as a library for political reasons. They were against plugins for the same reason originally. They have been resisting any attempts to clean up or modernize the codebase (they've been doing it, but very slowly, because it takes the steering committee a long time to... erm... steer).
There's an alternative - Clang / LLVM, which is built around that kind of tool support, has less niche stuff to get in the way, cleaner, simpler codebase, no legacy stuff. A good few GCC developers have jumped behind that instead, rather than trying to work against the FSF, and Clang isn't having the kind of problems attracting new developers that GCC is.
At this point, it does look like GCC is in trouble. The problem is that there might not be anything that anyone can do about it. As with all large projects with a long history, GCC has a hell of a lot of inertia, and it would take massive effort to shift the direction of the whole project, and make the changes that need to be made, especially considering that they can't just stop and spend a couple of years refactoring (which would definitely kill GCC).
Back then the there was an obvious threat of GCC becoming little more than a backend/frontend solution for proprietary interests which could lead to the open source part eventually wither and die.
Steve Jobs when at NeXT illustrates this problem as he tried to combine NeXT's proprietary ObjC frontend with GCC's backend and sell it under the reasoning that the 'end user would do the linking', he couldn't legally do so which is how GCC ended up with ObjC support which it otherwise hadn't, atleast not then.
Nowadays open source is established and it's benefits are well proven so these choices may look overly paranoid when viewed in the open source landscape of today, but back then and for a long time in GCC's development they certainly weren't.
The fact that an open source free compiler toolchain like GCC has established itself as such a 'de facto' solution has obviously had an incredible impact on the acceptance of open source in general, not to mention that Linux, the open source BSD's, and tons of other open source projects (and likely lots of proprietary projects aswell) would never have gotten anywhere near where they are today had it not been for the existance of GCC, a top-notch compiler toolchain free of charge and free to distribute.
It's the "nice" version.
The reunification is kind of glossed over here, but what happened was the FSF fought it all the way, realized EGCS would win, and accepted it back.
GCC got concessions as part of this reunification. The concessions were that GCC would have it's own steering committee, and that we could appeal any RMS decision to the board of the FSF.
Yes, gcc has commercial backers, too, but I think at the moment most of them are more willing to pay for the support of additional architectures or architecture variants than for new language features (at the moment; that can change if C++11 gets more commonly used)
It's possible to fork the code, but it's more difficult to fork the community. It's the problem that the BDFL have to solve to survive.
Really great point. I don't understand why this article focused on C++11 of all things. Until recently, gcc had much more complete C++11 support than Clang. Now, it seems they're about on par (if feature tables are any guide[1]). In fact, a couple years ago I was about to switch to Clang but when I started using C++0x I had to stick with gcc because Clang's support just wasn't there yet.
Also, LLVM's C++ Standard Library (libc++) is still pretty immature on Linux, so even if you use Clang for C++11 you're probably going to end up using gcc's standard C++ library anyways!
So yeah, this article is pretty sensationalist.
[1] http://gcc.gnu.org/projects/cxx0x.html and http://clang.llvm.org/cxx_status.html
Never believe anything you read there without independent verification, and even with verification, be suspicious....
Could it be ousted? Sure, if a gnu (or otherwise foss) competitor steps up and does it better (good luck..) but in that case, no problem. Could it be that the gnu/linux distributions and applications running the majority of the internet will have to rely on a proprietary compiler or die? That's just wildin' - issues aside that's nothing even any of the major corporations could really suggest.
There is a pretty compelling argument that LLVM and Clang are doing precisely that. And the "toolability" referred to in the article is a big part of that. Clang complete[1] is an example of using Clang to do things that the GNU toolchain thinks are perfectly doable with a box of regex. (Spoilers: they're so not.)
Switching compilers isn't that difficult, especially when they're as reliable as GCC and Clang.
https://wiki.freebsd.org/GPLinBase
Apple (as they would not accept GPLv3) was stuck with shipping the very old GCC 4.2.1, also Apple wanted to be able to incorporate the compiler toolchain into their proprietary solutions like XCode, something GPL obviously won't allow. Hence funding LLVM while starting work on Clang made sense for them, but again not a choice made (purely) on technological merits.
Mozilla switched its Mac builds from gcc 4.2 (or rather the Apple fork of it) to clang, because the cost of doing the switch was lower than the cost of avoiding all the bugs in said fork of gcc 4.2 that didn't exist in the other three compilers the codebase also had to compile with (gcc 4.4 on Linux and MSVC).
https://groups.google.com/forum/#!topic/mozilla.dev.platform...
And then moved their entire OSX and iOS development community as well ?
Most Phds I know in CS, have done work not directly related to their main research point. Usually in the 6 months before the deadline some way was found to relate the work with the thesis and it got written in those remaining months.
The end result produced by gcc in some cases is more performant (looking at profiling output), however we continue to use clang because most of our code spends a LOT more time in I/O than it does in certain tight loops that GCC would optimise, and clang produces better diagnostic output, and compiles faster thus we get feedback faster and spend less time waiting for our codebase to compile.
Clang is designed to be highly compatible with GCC-dependent projects, from extensions to command-line arguments. What's to stop them from just switching to Clang if GCC's complexity and lack of documentation prevent it from remaining competitive?
As always, this can be a case of what's best vs what's best for my case.
gcc is dead. It served us very well, but it is time to move on.
It seems like the open source community is working as it should here: someone designed a better mousetrap, and the world beat a path to his door. This is the way things should be, and the net result is going to be better open source software for everyone. Nobody wants to keep COBOL alive or CVS, so let's not be overly sentimental about gcc.