Slashdot Mirror


LLVM & GCC Compiler Developers To Begin Collaborating

An anonymous reader writes "While RMS is opposed to LLVM over its BSD-like license rather than the GPL, LLVM/Clang and GCC developers have agreed to try to start cooperating in an "open compiler initiative" to jointly tackle common issues that plague both compilers and issues that can be better served by working together rather than creating fragmentation between the two popular open-source compilers."

11 of 279 comments (clear)

  1. Open borders... one way? by paxcoder · · Score: 5, Interesting

    I'm not sure how GCC could benefit from this.
    While theoretically GPL could subsume BSD code produced from the collaboration, I reckon it's more likely that brains are going to migrate rather than code. And I don't see those working on LLVM (for commercial interest) migrating to GCC.
    If I were RMS I'd be worried.

    1. Re:Open borders... one way? by kthreadd · · Score: 5, Interesting

      Well, just getting both camps into the same room from time to time would be an improvement.

    2. Re:Open borders... one way? by Rosyna · · Score: 5, Informative

      I'm pretty sure this is not about sharing code, but about collaborating on needed features via a shared spec. So both compilers implement something a standard way instead of coming up with new features independently.

    3. Re:Open borders... one way? by thoth · · Score: 5, Interesting

      I was a compiler grad student, and my university had its own intermediate representation it did work with. Back then (mid 90's) there was also SUIF (stanford university intermediate form), something I forget from University of Illinois... there were probably others too. But some big-name CS departments focused on other stuff, databases, operating systems, AI, and weren't necessarily up there in compilers or revealing the details of their intermediate form (not that it's was a secret, merely from academia the algorithm is more important than the intermediate form used).

      Now, my old school adopted LLVM. I recently checked as I'm working with LLVM/Clang and found that quite interesting. I can't even pull up Stanford's SUIF compiler group research page (suif.stanford.edu, maybe I'm just unlucky or it's gone/moved/temporarily down). And LLVM/Clang is from University of Illinois... so yeah, I'm sure they are using it too.

      The benefit to GCC from this is to not become obsolete in 5-10 years, from a steady influx of improved algorithms and tuning from a body of people that can easily contribute. Just from the fact LLVM/Clang is easier to work with, universities using it for their classes/research means that there is a steady crop of undergrads/grads familiar with LLVM/Clang and its set of libraries. They can contribute, and the research community doesn't have to roll its own intermediate form for research algorithm implementation and then throw that out when it comes to implementing the same algorithms in an actual intermediate language that is used in a real compiler. When you're a student, the last thing you want to do when you've got a project due in the semester, or you are trying to write your thesis/dissertation and graduate, is screw with compiler internals that are purposely difficult to work with (GCC).

      Yes, GCC has a core group that has done an excellent job. But they are facing commercial interests improving the LLVM/Clang (i.e. Apple and Obj-C) plus now the OpenCL and OpenMP work going on, and on top of that an ever growing population of former students with skills/knowledge and perhaps the desire to contribute.

      f I were RMS I'd be worried.

      Agreed. Those years he opposed modularizing GCC might have really hurt the project in a way that isn't done being felt yet.

    4. Re:Open borders... one way? by Anonymous Coward · · Score: 5, Insightful

      For example, the pretty huge list of C and C++ extensions that both gcc and clang implement, and that are invented by the authors of said tools. It's much better that the two talk about it, and come up with one spec that both compilers implement than to have two competing standards that results in code one or other compiler can't deal with.

    5. Re:Open borders... one way? by maxwell+demon · · Score: 5, Insightful

      Another thing would be to harmonize the representation of fundamental classes like std::string and std::vector, so those classes can be passed between codes compiled with both compilers, even though the implementation code for those classes might otherwise differ.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:Open borders... one way? by hairyfeet · · Score: 5, Insightful

      I'll get hate for saying this but fuck it, truth is truth and RMS burnt a LOT of bridges with GPL V3 so I wouldn't be surprised to see more devs moving from GCC to LLVM and Clang.

      What RMS and his fans just seem to refuse to accept is a simple little bit of reality which is thus...this ain't 1979 anymore, no matter how many times RMS calls everyone "hackers" like he's at a computer club meting. The chips, the designs...we are talking about INSANE complexity folks, it is just not something "a couple of guys banging away in their basement" is gonna be able to do. What you have to have is dozens of highly skilled, highly trained guys working on this stuff 8-12 hours a day every day...the requires funds folks, no way you can get around that.

      What does that have to do with RMS giving corps the bird with GPL V3? Simple...where do you think ALL that money was coming from? Donations by individuals? Nope that was all being paid for by corps whom RMS made clear aren't welcome round here anymore. with GPL V2 you had kind of a "wink wink" with the corps while GPL V3 has made sure that you had better be a GPLed company if you want anything to do with GPL V3 code. This is why Google has a "No GPL V3" rule with ChromeOS and Android, and I have no doubt you'll be seeing money dry up for projects like GCC, simply because companies will be afraid to touch it.

      At the end of the day encouraging corps to open their code is fine, flipping them the bird if they refuse to go GPL? Not the smartest thing. We should be able to tell within the next year whether all the money is gonna go to GCC or LLVM/Clang, I personally think it'll be the latter.

      --
      ACs don't waste your time replying, your posts are never seen by me.
  2. Re:RMS needs to get over the GPL by Anonymous Coward · · Score: 5, Interesting

    Do companies contribute back? Sure, some do, some of the things. But everything else is competition.

    I would be very interested in seeing real statistics on this, because my experiences with companies using BSD style licensed code in their software suggests the exact opposite. There are a number of reasons to use open source software in your project, the chief among them being "not reinventing the wheel". The problem is, the moment you generate your own proprietary fork, you're back to reinventing the wheel. Chances are, you made the changes because the software in question didn't quite do what you wanted it to do, or to fix a bug. Great, so now you've got your own branch, and every time you update this software with the latest "official" version for whatever reason (including perhaps, not reinventing the wheel for some new feature) you have to apply your patches and changes, and hope that the patches you built against version X are still valid against version Y.

    In my experience, the only time companies don't give back is when they've made such massive changes that they would be maintaining their own branch anyway. And with changes that large, it's extremely unlikely the main branch would ever integrate them all back in, which means the company is maintaining their own fork, regardless of whether or not they've released the code. Now, you can argue (as RMS does) that regardless, the important thing is whether the new code is open, not whether it's ever merged back, but there are considerations to be had as well. Forks split and consume development resources. Different projects all doing the same thing slightly differently create more work for people trying to target those projects, such that writing new useful software that takes advantage of other available resources either requires multiple code paths to handle each resource (think vendor specific CSS tags but worse) or can't be meaningfully built without someone writing additional code.

  3. You are not reading history. by tlambert · · Score: 5, Insightful

    I'm not sure how GCC could benefit from this.

    You are not reading history.

    GCC moves too damn slow and doesn't include features that developers (and more importantly: the companies which pay developers) want. These days, that includes the changes between the GPLv2 and GPLv3 not being wanted by the people who pay the bills.

    GCC was more or less started in 1984: http://www.gnu.org/gnu/thegnup...

    GCC was almost replaced by the EGCS fork in 1997, and it took two years before RMS finally gave up on the idea of having the ultimate editorial control over the language implementation, and "blessed" EGCS as the replacement for GCC. When he did that, he gave up on limiting the OSs that the compiler worked on, and limiting the inclusion of things like #pragma (which used to exec "nethack" because RMS didn't like it), and some of the language front ends that are now included, like g77, which RMS didn't want.

    GCC is on the verge of being marginalized again by LLVM; all the sexy compiler work is happening in LLVM, all the bright young minds in the compiler world are going to LLVM because it's a lot easier to make a front end for a new language or a back end for a different processor or embedded controller or virtual machine. LLVM is the "go-to" compiler for academic projects involving compiler research.

    It makes sense; GCC: 1984; +15 years = EGCS: 1999; +15 years = ????: 2014.

    RMS' recent appeal *might* be able to attract a bunch of new ideologues to the GCC project, and have them forsake LLVM work, but more likely course and project requirements for a degree, and after that, an employer, probably mean that LLVM is going to remain the "go-to" compiler for the new blood.

    The idea that GCC can leverage some of the new blood by making it easier for them to work with code in both contexts, rather than leaving GCC in the ashbin of history, is about the *only* way to give GCC the transfusion of new blood it's going to need to survive another 15 years.

    It also couldn't hurt to expand the number of (or replace) members of the "GCC steering committee" so that GCC can get a little more forward momentum. You can get forward momentum one of two ways: (1) more specific impulse, or (2) take off the parking brake.

  4. Re:RMS needs to get over the GPL by paxcoder · · Score: 5, Informative

    Actually, no. You may use GPL'd code any way you like (that's freedom 0) and share with others (freedom 2). You can likewise modify the software any way you like (freedom 1). And all this time, you need not release source code. The condition to release the source only kicks in with freedom to distribute your changes (freedom 3), so only when there is a third person involved with your derivative you have to grant them the same freedoms you've been given by the original author.
    In fact, this was a problem with SaaS: You could've modified free software, and run it in the back on your servers, and say that you're simply providing a service to the end user, and since he's not getting the modified program, he doesn't get to have its source either. This is what AGPL is designed to address, and thus it's mostly used for web software. So with AGPL, as soon as you use a program, whether you have a copy, or are executing it online, you get access to the source.

  5. Re:RMS needs to get over the GPL by martin-boundary · · Score: 5, Insightful

    On the contrary, that point is exactly *why* we GPL advocates advocate it. We don't want to enable companies which have no intention whatsoever to be part of the community. They're free to do everything themselves, and good luck to them. But giving them a leg up to get off the ground just so they can be selfish assholes with their ideas? Why should we? And yes, sharing your *ideas* and *implementations* is what we mean by being part of the community. If this isn't for you, then don't let the door hit you on the way out, thanks.