Forgot your password?
typodupeerror
GNU is Not Unix Programming Open Source Software Technology

GCC Turns 25 192

Posted by timothy
from the old-enough-to-ethically-date dept.
eldavojohn writes "With the release of GCC 4.7.0, the venerable and stalwart constant that is the GNU Compiler Collection turns twenty five. More ISO standards and architectures supported with this release and surely more memories to come from the compiler that seems to have always been."
This discussion has been archived. No new comments can be posted.

GCC Turns 25

Comments Filter:
  • Measured from where? (Score:4, Interesting)

    by Anonymous Coward on Thursday March 22, 2012 @06:19PM (#39445683)
    Are we measuring GCC from the first version called GCC, or are we measuring from the last release of EGCS, which is actually what we're now using and calling GCC? 'cos where the original GCC went, no one followed...
  • by Tubal-Cain (1289912) on Thursday March 22, 2012 @06:27PM (#39445771) Journal
    ...wasn't GNU Emacs used as the example of the "cathedral" model?
  • by Anonymous Coward on Thursday March 22, 2012 @06:43PM (#39445897)

    EGCS stands for Experimental/Enhanced GNU Compiler System. It was a decendant of GCC which used a more open development process. This meant that it included more optimizations and language features than the standard GCC.

    This experiment was very successful, and version 2.95 of GCC adopted the EGCS code. Since then GCC has been developed using the same methods as were used for EGCS.

    For more information and the official announcement (now historical) see this page and the GCC homepage.

    When you have a project fork, like egcs, that gets folded back into the main branch (or even when it becomes the main branch), then the main branch gets to hog all the credit and claim that it was its idea the whole time.

    So gcc is and always has been gcc, even when it was egcs. :P

  • Re:Pastel compiler? (Score:0, Interesting)

    by Anonymous Coward on Thursday March 22, 2012 @06:43PM (#39445899)

    Hoping to avoid the need to write the whole compiler myself, I obtained the
    source code for the Pastel compiler, which was a multi-platform compiler
    developed at Lawrence Livermore Lab. It supported, and was written in,
    an extended version of Pascal, designed to be a system-programming
    language. I added a C front end, and began porting it to the Motorola
    68000 computer. But I had to give that up when I discovered that the
    compiler needed many megabytes of stack space, and the available 68000
    Unix system would only allow 64k.

  • by hamster_nz (656572) on Thursday March 22, 2012 @07:31PM (#39446269)

    I've actually been tempted to have a fling with TCC [bellard.org].

    Small, tight, flexible, low maintenance and can do the business just about anywhere.

  • by samkass (174571) on Thursday March 22, 2012 @08:12PM (#39446583) Homepage Journal

    Indeed, for most of gcc's existence I always saw it as a reasonable lowest-common-denominator compiler, not an especially good one. Up until about a decade ago, "cc" almost always beat "gcc" in performance on any given UNIX, but every "cc" was so different (especially if you dared throw C++ into the mix) you had to virtually port your code to each one. gcc was available for everything and had a reasonable percentage of the standard implemented so was where everyone gravitated towards. Since egcs merged back in and linux has gone more mainstream with Android variants it's gotten a lot more attention and is finally a pretty decent compiler.

  • Re:Thanks gcc! (Score:5, Interesting)

    by Anonymous Coward on Thursday March 22, 2012 @08:19PM (#39446643)

    Err... no?

    Clang can be faster than GCC, when compiling with no optimizations. When you compile with optimizations enabled, that advantage disappears. Despite being nearly as slow as GCC with optimizations enabled, the binaries it produces are often slower. Some code (usually code that benefits from optimizations that Clang's developers could implement more easily than GCC's developers) may be slightly faster when compiled with Clang, but GCC's optimizer is far more mature than Clang's, and generally works better.

    Error messages... Can't argue there. Modularity is pretty cool too, especially when you can built other tools on top of Clang that use Clang's parsers. Nothing stopping you from using those tools with another compiler though.

    Clang's also not nearly as full-featured as GCC. Cross-compiling is a good example. Clang supports only a very limited number of architectures, and even with a supported architecture, cross-compilers are still kind of clumsy. Sure, GCC isn't perfect at this either, but you can use GCC to build code for virtually any platform that's still in use, and almost every platform that's been in use in the last 20 years, on nearly every operating system.

    On most of the platforms GCC supports, it's by far the best compiler available. In some cases, it's the only compiler available. Even if the Clang developers wanted to support such a wide variety of platforms (they don't), it would take years to even approach GCC.

    Even for things like C++11 support, GCC is still ahead. Despite Clang being apparently easier to develop (better architecture, or whatever), GCC has such a huge head start on Clang that it's managed to support far more of the new standard than Clang. It supports more of it than Microsoft's compiler too (which I gather has an architecture similar to Clang, but grew from an architecture that more closely resembles GCC).

    Basically, Clang's a great compiler, but it's still very new. It's developed amazingly quickly, and I think it's going to be a fantastic compiler in a few years, but it's not quite there yet.

  • by fast turtle (1118037) on Thursday March 22, 2012 @08:23PM (#39446685) Journal

    RTFM idiot - Os means to optimize for size. The generally accepted standard flag for GCC is -O2 as it's the best compromise between Size and speed up. The only thing is, Sped Up is dependent upon various elements within the source code such as loops and CPU specific options as we Gentoo users tested. Some apps actually do well with O3 flag, most work fine with O2 and from my experience, Os offered the best performance with smallest size possible from the binaries. Most of the speed increases come from fewer cache misses as the binaries are sometimes small enough to actually fit within the L2-L3 cache when the cpu has sufficient space.

  • Re:Thanks gcc! (Score:5, Interesting)

    by serviscope_minor (664417) on Thursday March 22, 2012 @08:28PM (#39446715) Journal

    But the key for any commercial entity is that clang beats the pants off any GPLv2-licensed compiler, and GPLv3-licensed code is pretty much irrelevant to most applications. So GCC is doing a great job for the insulated linux world, and hopefully clang can catch back up to offer the rest of us a better choice.

    God, I hope not, I really do. I remember the bad old days, especially with embedded vendors. They would livense a perfectly good compiler front end and then fuck it up beyond repair. The resulting steaming heap of shit would crash half the time, and mysteriously not support random language features.

    Ever since GCC took over the compiler world, my life has been much better.

    Experience says that if you give vendors the chance to screw up a compiler in the name of "business" or "propretary" or whatever then they will.

  • by Anonymous Coward on Thursday March 22, 2012 @08:29PM (#39446725)

    I know your joking and I think I can smell sarcasm even but you are not helping our cause one bit.

    JavaScript as a language is not the problem it can be used wisely. It is has been intentional been feature ridden and with the state of the browser wars going on anything complex is a security risk. The browser wars have also probably left it with the worst development tools known to man.

    Don't even get me started complaining about how every site doesn't work because it uses JavaScript, and that is sent as raw code on every request unless you pull magic tricks to combine, minify, compress and CDN serve.

    It's a retarded misuse of an okay idea and just begs for every thing to break with it's modern day usage.

  • by phantomfive (622387) on Thursday March 22, 2012 @09:28PM (#39447031) Journal
    If you're programming in C, which is very likely if you're doing embedded, you're going to hate your life if you have to use Microsoft's compiler. It doesn't support C99 very well (at all?), it doesn't allow inline functions, forces you to declare all your variables at the top of a function, and a number of other annoying things that I only remember when I have to use it.

    Basically stay away from Microsoft compiler for C if you can help it.
  • Re:Thanks gcc! (Score:5, Interesting)

    by PaladinAlpha (645879) on Thursday March 22, 2012 @09:59PM (#39447187)

    This is just fearmongering. It's not complicated at all. If you don't hook GCC's (internal) intermediate code generation to run some custom process on, then you are covered by the compilation exemption.

    Configuring your build to output GCC intermediate, retain that output, modify it with an external tool, and resume the build with the modified intermediate code is not something that will happen by accident. The implications of GCC being GPLv3 are, exactly, none.

    FreeBSD's philosophical objections to GPLv3 are well known and they have the right to maintain those objections, but that has little bearing on GCC's use for a proprietary end product.

    I would be interested to hear about your build process that you feel is likely to accidentally create a non-exempt compilation. Do you have an example?

  • Theodore Ts'o yay (Score:5, Interesting)

    by brainiac (90448) on Thursday March 22, 2012 @10:23PM (#39447315)

    Linux started on usenet, and what really made it blow up was the ability to use gcc to write software. The first version of linux everyone was running didn't have a login, you just got root. Soon the login program came, (i think getty). But anyway it was Theodore Ts'o who did the heavy lifting. Every new program needed something new in the C library and Theodore somehow got it done.

    Thanks Theodore !!

  • Re:Thanks gcc! (Score:5, Interesting)

    by TheRaven64 (641858) on Friday March 23, 2012 @08:08AM (#39449459) Journal

    The FreeBSD project has already declined to upgrade its GCC implementation to the GPL version 3 release.

    With my FreeBSD developer hat on:

    The reason that we have not upgraded to GCC 4.3 or later is not that we fear GPL contamination of resulting binaries. In fact, we're working on external toolchain support that will allow you to build FreeBSD with the gcc 4.7 from ports if you want. The problem is that FreeBSD ships a complete UNIX system, and the Single UNIX Specification requires a C and C++ compiler. Lots of downstream users want to take FreeBSD and distribute derivatives of it. Many of these have a no-GPLv3-anywhere-in-the-company policy. This is because distributing GPLv3 code may inadvertently license some of your patents. Even if you think abolishing software patents would be a good thing, just licensing yours to everyone while your competitors don't is not a very good strategy...

The meat is rotten, but the booze is holding out. Computer translation of "The spirit is willing, but the flesh is weak."

Working...