GCC - 'We make free software affordable'
h-online.com
h-online.com
Maybe it will be similar with LLVM. Back in the days Apple suggested to put a gcc front end to LLVM, but the GCC people were strongly against it. They seemed to have a really dislike of LLVM, or its licence, or the company behind it.
Eventually Apple (and the rest of the LLVM community) continued on their own. If GCC one day will become irrelevant, I think it's got only itself to blame, and a certain type of elitist arrogance. I wish (for them and the FOSS community in general) that the successes of LLVM will help them clean their house and keep going for decades and decades.
Perhaps someone with technical experience with both internals could comment?
My level of experience in both: I hacked a specialized LLVM inlining pass in graduate school. I've written two middle-end passes for GCC and tweaked GCC's inliner in similar, though less invasive, ways. I found the level of difficulty to be similar between the two projects.
Other people may have different opinions. I remember reading a claim of a graduate school project that tried for four months to get started on a middle-end optimization pass in GCC and got nowhere; after switching to LLVM, they made progress in a month or so. Personally, I think that meant they weren't trying very hard with GCC.
As for GCC, I think the pain points are twofold: the documentation for the middle-end is somewhat scattered. I honestly think enough information for figuring things out is present, it's just not always obvious where to look. There are lots of other passes to look at too, which can be extremely helpful. Assumptions of the interface, or side-effects, are not always stated, which can be surprising at times. The other pain point is contributing upstream: you're going to get dinged on formatting, documentation (usually just "did you do it"; the review is generally not as thorough as say, GDB's documentation review), compilation time, etc. etc.
Also, GCC's hash tables (htab_t) are a pain to use correctly.
Of course, my experience is somewhat slanted towards the middle-end; the set of pain points is somewhat different if you are working in the front-end or the back-end. And my set of pain points from the middle-end might be different if I had worked on different optimization passes. (My passes cared very little about things like aliasing, for instance.)
It's surprising to me that you mention memory management as a pain point, though I can see how the variety can be bewildering. The only distinction that really matters is between GC'd and non-GC'd memory. obstacks and alloc pools are only ways of providing specialized malloc interfaces. A useful rule of thumb is that if your data is only needed for one pass of the compiler, then you can allocate it any way you like; if the data is longer-lived than that, it needs to go in GC'd memory. I can elaborate if you'd like, but that's the basic idea.
FWIW, I agree that the whole GC system is somewhat baroque. The GC was a decent solution to an engineering problem and the whole mechanism nicely solved memory management problems and provided the basis for precompiled headers, but it causes problems in other ways nowadays and trying to get rid of it would be a huge effort.
I think there's also some dislike of the project itself, or perhaps the people behind it. But that's another discussion.
> The problem are always an excessive centralisation of stewardship... which is kind of ironic coming from the guy who most strongly supported free software.
I don't think it's so much centralization of stewardship for technical decisions, but stewardship of the rights to the code; i.e. you need to sign copyright papers before committing non-trivial patches. And I can assure you that the FSF sees doing so as strongly supporting the cause of free software. There are obvious counterexamples (the Linux kernel's more lax Signed-off-by policy comes to mind), but there are reasons why this centralization is done.
I know this centralization causes problems. Getting assignment papers submitted if you are at a university is a pain; your employer may not be keen on signing them either. It'd be nice to see the process streamlined, or even banished entirely, but I doubt that's going to happen.
> I think it's got only itself to blame, and a certain type of elitist arrogance.
I'm curious where you think this "elitist arrogance" comes from or even what sort of behaviors you're referring to. Can you elaborate?
When it comes to the topic of stewardship the situation is less clear cut from my point of view. I think there's a (very human) feeling of "I've created this toy so I get to decide". In part it's a good attitude: if you managed to develop it this far there are good chances you'll be able to develop it further. But sometimes it makes people a bit blind when something better comes along.
In that sense using technological reasons, or the cause of free software, seem to be more of a way to (maybe not on purpose) push away whoever wants to change the way things are run. But that's purely a gut feeling.
Incidentally that's what I tried to convey with "elitist arrogance". This kind of "we know best" and "who are you? what are your credentials?" attitudes. Though I am not surprised it only made thinks more confused to a reader. Sorry about that. :)
As for "elitist arrogance", I think what you are getting at is that you see the FSF's policies as erecting a moat and a wall around GCC and telling the rabble to stay out while the nobility quietly hack away at their desks. If I have understood you correctly, then I see the argument, but I do not agree with it. As long as GCC is an FSF project, that's just the way things are going to be. I don't think the FSF has set out with the intent to be "elitist"; it's unfortunate if that's the way the policy is perceived. Feel free to correct me; it's possible that I've misunderstood you.
The FSF does not, on the whole, dictate the technical direction of the project. So the goodness or badness of technical changes and any "elitism" associated with acceptance or rejection of such changes is another issue.
Perhaps things will change if GCC ever disassociated itself from the FSF: another egcs-style fork or something more dramatic. There have been small rumblings of such a change, but I think such an event is quite unlikely.
I like your example of the moat. I think though that nobility is not very much defined in your metaphor. After some thought I think there is a strong sense of community maybe, where those who've worked there the longest are those who become the "nobility". And people do not want a "foreigner" to come and change their ways, even though he may back his ideas with facts and good arguments.
In a way, a method that made sense once, is used for such a long time that at some point it becomes more of an "ideology", like a nationalistic feeling.
If you're talking about the NeXT ObjC frontend, that wasn't a matter of course. It actually took legal threats to get them to meet that obligation.
If you go grab the GCC tarball Apple provides, it has many, many changes from the GCC 4.2 sourcebase. Lots of those changes have not been submitted back upstream. The code is available, granted, but it's not available in a way that's helpful to anybody but Apple.
If upstream wants patches so badly they can download the tar-ball provided by Apple, diff the two source trees and document, and submit those patches to the upstream. It is not the companies responsibility to do so. The GPL only states that it MUST make the source code and its changes available.
Last paragraph on page 4: "GCC 4.5 was released in April 2010. A major new feature is a plug-in facility for third party code. One of the first plug-ins on offer is DragonEgg, an LLVM back end for GCC."
Summary: Competition from LLVM has finally forced gcc to create a plugin architecture. It'll make less software free, but it'll get more people using gcc.
They don't look at the freedoms each license gives but just their own selfishness of wanting everything shared for the supposed greater good, when those of us in the BSD community really don't worry too much since most companies put back BSD licensed source code anyway since it is in their own best interest. Giving the companies a choice is something they can't fathom.
- Wasabi Systems (which contributed back less and less, except for journaling support just before it went down).
- BSDi (contributed almost zero, until they merged with FreeBSD Mall).
- Apple, contributes non of their differentiating technology back to the BSDs.
- Practically any closed-source system used the BSD TCP/IP stack at some point, few contributed back.
I loved the BSD license. I still love the Apache 2 License (which is very BSD-like). I was a developer in the NetBSD project. But as much as I dislike(d) the GPL, the license is very well able to make users contribute back. The Linux kernel has a very healthy pool of enterprise contributors. *BSD development is very much driven by free-time contributors and very small consultant firms. And it shows. It is great that such such a small pool of contributors can build great systems. But Linux has outdone BSD in many areas.
I know, it sucks, but it is true. Few people want to give competitors a carte blanche to start with your work, and keep improvements to themselves.
a) Apple's kernel is open source: having used GPL would not have made any difference here b) The other BSDs have openly stated that Apple contributed back and thanked them for it.
Not only that, there are a lot of open source technologies that Apple has contributed to or is the main company behind it. In fact to find an example you didn't need to go any further than LLVM (discussed in this article). Apple is the company most strongly behind LLVM: they could continue in house without contributing any of the source, but they don't (and why should they? What advantage would it give them?).
Finally and I think the most important thing, is to ask: had those technologies been GPLed, would the companies have contributed back (as you seem to expect), dumped it all on their website, or simply have refused to use that code?
(edited for grammar)
Except for a necessary parts to make it useful. From someone close to the source (the last paragraph pretty much wraps it up):
http://www.synack.net/~bbraun/writing/oshistory.html
"b) The other BSDs have openly stated that Apple contributed back and thanked them for it."
Yes, see the <s>huge amount of code</s> that Apple contributed to the NetBSD kernel:
http://nxr.netbsd.org/source/search?q=apple&project=/src...
"Finally and I think the most important thing, is to ask: had those technologies been GPLed, [...], or simply have refused to use that code?"
Yes, who would use (L)GPL code in their systems?
$ gcc -v
gcc version 4.2.1 (Apple Inc. build 5664)
$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
[...]
This program built for i386-apple-darwin10.0
$ troff -v
GNU troff (groff) version 1.19.2
It's true that LLVM and Webkit (based on KHTML, which was LGPL) are exceptions. However, it remains to be seen what they contribute back to LLVM in the future. Probably just those bits that will give them the tools edge.The OpenBSM implementation in FreeBSD is based on the BSM code in Darwin.
Submitted by Apple to FreeBSD (apple.com email addresses)
http://freshbsd.org/?branch=&project=freebsd&committ... http://freshbsd.org/?branch=&project=freebsd&committ...
Apple, Inc:
http://freshbsd.org/?branch=&project=freebsd&committ...
Also, since all of this is BSD code, and those of us who developed under the BSD license agree to the fact that the code may be taken and used, and that works for us. Companies that know what is ultimately good for them will contribute back, maybe not all of their secret sauce so that they can continue to make money but at least part of it.
I am not sure what you are referring to. I'll try to reply to a few of the points raised in the article (but I have only skimmed it, so if I missed your point feel free to point it out).
Darwin is still being updated. Back in 2006 Apple didn't release the x86 code straight away, but I think they did so after a while.
DarwinBuild still exists and (apparently from their webpage) it is still being updated. This is a project supported by Apple whose only purpose is to build Darwin
As for Apple not including some of the drivers code in Darwin I can't say I am surprised. By looking at the fights between kernel people and drivers developers on Linux it seems a lot of companies (e.g NVidia) simply would not accept their secret sauce to be open sourced for fear it will reveal secrets of their architecture. Though correct me if I am wrong.
Finally the article you linked to asks why should people contribute to Darwin if Apple is less than helpful. Here I agree with you. Apple could do much more to help and encourage Darwin. But I don't see how this would be any different if the code were GPL.
And incidentally Android uses the same technique (keep development closed and open source the final version once it's being used) but everybody praises Android for being open source. (which is true, since they did open source _everything_ and Apple keeps things like Aqua closed source, but my point is that you don't hear quite the complains about Android's development model, as you do for Darwin's).
As for your second point, I think X-instance replied better than I could.
Between this and a Darwin world where the latter group would release good drivers but keep them close sourced, I don't think there's any advantage for the community either way.
While I do agree that Apple is most definitely not trying to build a healthy ecosystem around Darwin (or in fact _any_ ecosystem at all...), Apple itself still publishes all of its Darwin code, and hence it would have complied with the licence had that been GPL. (the only exception being drivers but that's not up to Apple, as the situation in the Linux world showed).
Apple could have still kept Aqua and the rest closed source. So using Apple as an example of a company that took but didn't give back because of the licence seems wrong.
http://www.h-online.com/open/features/GCC-We-make-free-softw...