72 points · by al3xbio · 14y ago · 46 comments
The whole point of GCC is to have a complete compiler toolchain where all the enhancements are being made available to _all_ end users. Catering for companies who wants a free strong frontend/backend on which to develop their proprietary extensions is obviously NOT what FSF is interested in and I personally agree with their 'ideology' in this case as the last thing I want to see is a situation where developers keep their enhancements proprietary (likely due to the wishes of their companies who see no gain in releasing those enhancements and instead wants to keep those enhancements as a competitive edge).
Also I like how GCC enforces patent protection grants to be given by code contributors, something which LLVM does not and I fear is something which could open a big can of worms later down the road.
Off course, scoffing at the 'ideology' which lead to the creation of the toolchain that is fueling pretty much the entire open source ecosystem not to mention lots of proprietary projects aswell makes you look pretty stupid in my book. Also GPL is obviously a licence through which numerous companies find it agreeable to cooperatively develop code, hence the success of Linux and GCC.
"The whole point of GCC is to have a complete compiler toolchain where all the enhancements are being made available to _all_ end users." ... "the last thing I want to see is a situation where developers keep their enhancements proprietary."
I believe you have correctly expressed a consensus opinion of why it would be 'bad' to allow proprietary plugins. And your claim posits a reason:
"(likely due to the wishes of their companies who see no gain in releasing those enhancements and instead wants to keep those enhancements as a competitive edge)."
Which is also a common reason given.
However what if there was a different reason? What if there is some capability that could be created with a plug-in that is pretty specialized, further that plug-in would require specialized domain knowledge and would only be of use to a small number of GCC users.
Traditionally the way the market has created such things is that a person invests their time to create the capability, and they charge a fraction of what it cost them to others to use the capability. The compute the fraction to offset the cost of developing it, and the community benefits by getting access to this capability for a fraction of what it would cost to develop in house, and the developer benefits by having the cost of their efforts covered by the community.
In a GPL world where the work would be considered derivative, you remove the opportunity for people to charge for their work, and thus you remove the economic motivation for getting something built. This damages the community as a whole with a somewhat 'invisible' "didn't go there" sort of damage (you only miss something if you had it and then you don't, not if you never had it). It is an unfortunate byproduct of GPL like licenses that they poison[1] the market for those specialized tools.
I completely understand the motivation behind the FSF and GCC communities for wanting to keep GCC available for all.
But you have to also note that people who sell software make very much the same arguments in defense of copy protection. They (the software producers) argue that they want everyone to have the same experience and they can't control that experience if people are out there making bootleg copies and changes they don't know about. So they deny something their customers want "software unburdened by loathsome copy protection" to preserve their stated goal of giving everyone the same experience with their software.
So if the FSF and GCC communities are denying something their customers want "modularized GCC tools for easy customization through plug-ins" in order to preserve their stated goal of giving everyone the same experience with their software, well it strikes me as ironic.
[1] Sorry for inflammatory way that sounds, my thesaurus is coming up blank on terms that mean 'something which kills an existing organism and keeps it dead'. Using 'nuke' seemed worse.
You can flame over that if you like (but please don't: just google the older flame wars from the 90's, this is depressingly well-travelled ground), but don't get confused over the motivations of the actors. The FSF has been nothing if not crystal clear about their priorities.
The irony is that if folks are trying to check in changes into the GCC tree that allow for plug-in modules because that is what they want, and the community is denying those commits because they fear having a plug-in architecture would enable other people to do bad things. Well that is ironic that such changes would be denied based on a potential transgression for some of the users.
When I read the argument it sounded like what folks had been arguing on the other side back in the 90's, hence the irony.
Whether it worked or not, I'm not sure. The copyleft strategy's success is a fairly complex game-theory problem that's pretty specific to the costs/benefits/alternatives of each party in each situation. The whole point is to try to force a sort of quid pro quo: you can use my free software as long as you open up yours too. As with any quid-pro-quo proposal, whether the other person accepts depends on a lot of factors.
edit: digging for some examples, I think the D front-end may have been open-sourced as a result of that policy, to give D a second compilation route (besides the official Digital Mars D compiler).
Competition is good, and it's great to see that GCC development is going strong.
"GCC 5?" http://gcc.gnu.org/ml/gcc/2012-03/msg00256.html "GCC 5 & modularity": http://gcc.gnu.org/ml/gcc/2012-03/msg00263.html
LLVM integrates better with tools, has an amazing static analyzer, and AFAIK generates code that is on average as fast and small as GCC. (I believe who wins depends on the code.)
That said I use both, and at work we test our code against both toolchains (and some other compilers aswell). The static analyser in Clang is a welcome addition and the error diagnostics/reporting is top notch so it certainly has strong features even though it falls behind GCC in code optimization.
However, GCC 4.7's just around the corner and I haven't tried that yet...
Though, admittedly, if speed is an issue you probably have already manually loop-unrolled and used the gcc compiler intrinsics.
A) it's proprietary, I have no interest in relying on a proprietary toolchain (and from what I gather neither does the company I work for)
B) it supports a very limited range of cpu architectures, not only is it directly tailored for Intel cpu's it even has a history of selecting poor code paths for AMD cpu's.
As for manual loop unrolling, for alot of code PGO does a great job here by unrolling based on the statistics gathered during the first pass. In fact GCC's pgo seems to do a better job than ICC's pgo implementation, ICC's lto beats GCC's on the other hand, and of course ICC does a better job at vectorization and has better optimized math functions.
Yawn. LLVM seems nice. When it competes on merit in the big world instead of in a sandbox people will care more I guess. Last I tried building my C++ project with it, it puked on the STL headers.
Use what you like.
I find the rest of our comment somewhat derogatory towards LLVM and the kind of things you can do with it today, it's already at a point where it provides comparable compatibility and features as the many different GCC versions you'll find on various unix systems. Somehow every time I read something about LLVM here people start to rant about some incompatibility they've seen that GCC doesn't have, as if GCC is the epitome of compilers. From experience I can tell you LLVM shows better compatibility with current GCC versions, than many older GCC versions that are still shipped with some Linux distro's.
Eventually, unless GCC makes a giant leap forwards in all the ways set forth in this article, LLVM is going to replace it, sooner or later. I think that's what the guy above me was about when he asked why GCC is still relevant today.
So no, I don't really "care" about it. Fix the compiler to actually be better for my purposes than what I have before telling me what I should use or care about please. And when you do, I promise I'll join your little cult, OK?
Define 'current development environment', both at home and at work GCC is the primary development environment for me as far as compilers go, I'm not waiting for GCC 5.0, I am using GCC 4.6 today.
>comparable compatibility
Is a very fuzzy statement, having compiled lots of open source projects under many different compilers there are certainly many projects out there which fails to compile with Clang (but it's certainly making fast progress in compability). Granted most if not all of these packages were written against GCC and some of them may use GCC extensions Clang/LLVM does not yet (or in some cases won't) support or some other quirks which all compilers have in their implementations of different standards.
>Eventually, unless GCC makes a giant leap forwards in all the ways set forth in this article, LLVM is going to replace it, sooner or later. I think that's what the guy above me was about when he asked why GCC is still relevant today.
Been hearing that ever since LLVM (and later Clang) surfaced as an option, I'd say you'll have to set your hopes for 'later' (Clang's been around what? 4 or 5 years now?). Personally I can't see why anyone other than someone with an agenda would want either compiler to disappear, competition means better tools for us end users, no matter which toolchain we prefer.
As for modularization, that has been an ongoing task in GCC long before this particular mailing list discussion, and I think it will continue as it has now in small steps.
That said, having a C++ compiler designed for humans and not robots is to be commended.
LLVM is where the innovative ecosystem lives now, even if GCC is more reliable for just churning out fast C code.
Making the project more modular, while not a bad idea in itself, could potentially delay the implementation of the latest standards.
We already have llvm as a c++ monster(hundreds or thousands of MBytes on my mac), witch is modular, and have a more permissive license.
So you are going to risk the only advantages of gcc,(written in c and relatively small and stability), so you could copy the new kid on the block?
If you are going to copy them, copy the more permissive license. It will give commercial companies like Apple the option to improve your software like they do with llvm(Apple hired llvm creator).
LLVM + Clang source code: 9.9MB + 6MB = C, C++ and Obj-C compiler and linker
GCC source = 69MB = just C compiler and linker
G++ source = 6.6MB = C++ additions to GCC
So I'm curious as to where you're getting the "hundreds or thousands of MBytes on my mac" from.
One confounding factor is backends. On one hand, GCC has a lot more of them, which contributes to a larger source base, but shouldn't be considered a disadvantage out of hand. On the other hand, LLVM builds all 13 of its backends into the binaries and libraries by default (compared to GCC's single-backend approach), which contributes to larger installed files but shouldn't be considered a disadvantage out of hand.
As a minor point of order, neither LLVM nor GCC include a linker; they both shell out to the system linker (often GNU ld from binutils). LLVM now has the equivalent of an assembler (direct object code emission) for those backends that support it, and the nascent lld ( https://github.com/chapuni/lld (warning: i couldn't find the webpage in www/ hosted anywhere, this is as close to something canonical as I could find) ) looks to be the beginnings of an LLVM-affiliated linker.
This is perfect; the actual idiom is 'bad rap' but this actually makes more sense in context. ;)