Follow Slashdot stories on Twitter

 



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

GCC Turns 25 192

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:
  • by hamster_nz ( 656572 ) on Thursday March 22, 2012 @06:12PM (#39445615)

    Hey GCC, only one slice of cake for you - you are big and slow enough at the moment (but I love you anyway).

    OH NO! It's like I'm married to GCC!

    • Codependency destroys families.

    • by beelsebob ( 529313 ) on Thursday March 22, 2012 @07:05PM (#39446067)

      Run off with a young, pretty, thin floosy [llvm.org] instead!

    • If you really want to speed up your GCC compiling, the fastest speed boost you can get is to compile more than one file at a time. Seriously, try it; it's a massive speed boost.
      • by Mr Z ( 6791 ) on Friday March 23, 2012 @07:39AM (#39449323) Homepage Journal

        What's all this about GCC being slow? It's one of the fastest (in terms of compile time) compilers I work with regularly. You need to try out some highly optimizing compilers for embedded processors sometime to reset your expectations.

        Some real numbers: I just recompiled (with all the optimization bucky bits turned out) my Intellivision emulator and SDK. That's just over 100K lines of code. Took 3.75 seconds with make -j6. "But that's a parallel make!" Fine, I'll do it again tying three of my computer's CPUs behind its back: 13.54 seconds. (Only 8.6 CPU seconds.) At work, it can take 5 seconds just for RVCT (ARM's compiler) just to contact the friggin' license server. Or maybe it's our NFS servers. Hard to say.

        Ok, now to be fair, that's nearly all C code. C++ is a whole 'nuther animal. But much of that is C++'s fault, or more correctly the modern C++ libraries. The template processor is a Turing complete functional programming language, if you sneak up on it sideways and catch it off guard. The STL and Boost folks have perfected that snipe hunt and made an industry out of it. That means that C++ code can compile a bit more slowly. (Fine: "a bit" is an understatement. More like a quadword.) BTW, my comment on STL and Boost is not meant to be a flame of their work. It's incredibly useful stuff. But, I consider a bunch of what they're doing something of an abuse of C++'s limited mechanisms. If C++'s metaprogramming facilities were more deliberately designed for this level of use, I think compile times would come down and we'd avoid the "thirty pages of spaghetti because you forgot a comma" error message experience.

        The book "C++ Template Metaprogramming [boostpro.com]" has a rather enlightening chapter (Appendix C) on compiler-time performance for various C++ features. (Get a glimpse here. [amazon.com] Just search for Appendix C.) Unfortunately, it's not terribly up to date--my copy says (C)2005--so it measures GCC 2.95.3 and GCC 3.3. GCC definitely was not a performance leader in that era, but most of the compilers were pretty bad. I'd love to see an updated version of it for the latest crop of compilers. I seem to recall finding a website a couple years ago with updated data that showed GCC fixed some of the quadratic algorithms in this space, but I could be dreaming it. If anyone actually has pointers to some data on this, that'd be great.

  • by jabberw0k ( 62554 ) on Thursday March 22, 2012 @06:17PM (#39445663) Homepage Journal

    "I then realized that the Pastel compiler functioned by parsing the entire input file into a syntax tree..."

    Is that some faded-out version of Pascal, perhaps?

    • "I then realized that the Pastel compiler functioned by parsing the entire input file into a syntax tree..."

      Is that some faded-out version of Pascal, perhaps?

      I imagine it was, since he's talking about what happened in 1984.

    • Pastel and LLNL (Score:5, Informative)

      by Al Kossow ( 460144 ) on Thursday March 22, 2012 @08:00PM (#39446483)

      Pastel was an extended Pascal compiler developed by LLNL for the S-1 supercomputer project
      http://www.cs.clemson.edu/~mark/s1.html [clemson.edu]

      It, and several other significant pieces of software, including the SCALD hardware design language
      were made freely available by LLNL. I have one version of the compiler, which was donated to the
      Computer History Museum by one of its authors. I have been looking for the other pieces since the
      late 80's.

      If you look at the GNU Manifesto, RMS was also looking at using the MIT Trix kernel in the early days
      of the project.

  • 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 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

    • EGCS wasn't a new compiler, it was a fork and refactoring of GCC.
  • Thanks gcc! (Score:5, Insightful)

    by stox ( 131684 ) on Thursday March 22, 2012 @06:24PM (#39445747) Homepage

    You youngin' have no idea of what kind of crap for compilers we had to put up with until gcc.

    25 years of compilation with gcc!

  • by bzzfzz ( 1542813 ) on Thursday March 22, 2012 @06:26PM (#39445761)

    Before GCC there were some excellent (for their day) compilers available from what was then an obscure technology company called Microsoft. There were cross-compilers for unusual platforms from Manx Software.

    Kids these days. Next thing you know they'll think they invented sex.

    • by fnj ( 64210 ) on Thursday March 22, 2012 @07:01PM (#39446043)

      Actually, while PC duffers were futzing with 16 bit Computer Innovations C, Lattice C, Microsoft C 1.0 in 1983, which was pretty much just a ripoff of Lattice C, then through the 80s with Microsoft C 2.0 through 6.0, with the first hesitant entry to 32 bits in 5.0 near the end of that period (even though there was no proper Microsoft 32 bit OS available yet at that time), REAL embedded programmers were working with 32 bit 68000, 68010, and 68020 using Green Hills C and compact deterministic real-time multi-tasking kernels such as VRTX.

      Green Hills C was a significant improvement on the Portable C Compiler that came with SunOS and other BSD based unixes in those days.

      When gcc finally matured, it was an ENORMOUS boon. The action nowadays is moving to Clang/LLVM though. With Clang, you don't have to compile a separate version for every cross-compile target. Every Clang executable is capable of producing code for any of the supported targets just by using the right run-time options. Of course, this doesn't address the point that you still need appropriate assemblers, linkers,libraries, startup code etc for each target. But they are trying to get a handle even on that with the Clang Universal Driver Project.

      • With Clang, you don't have to compile a separate version for every cross-compile target. Every Clang executable is capable of producing code for any of the supported targets just by using the right run-time options.

        How is this an advantage? It sounds like it gives you all the disadvantage of a VM (slight slowdown, etc), with none of the benefits (garbage collection, array bounds checking). Why would you not want to compile the binary down to the metal?

        • He's talking about the compiler. With GCC, target selection is a compile-time option, so if you want to target (for example) Linux on x86, ARM, and MIPS, you need to compile three different versions of GCC. With clang, you just provide a command-line option to your build and it will generate the code. This is even more important when coupled with something like distcc, which will run the preprocessor on the local machine so you don't need the include files everywhere else, and you can cross compile for a

      • by rs79 ( 71822 )

        You forgot Mark William's C - or was that just Z-80, I don't remember.

        At any rate, GCC owes a lot to DECUS C which was donated to DECUS (the Digital Users Group, digital as in PDP-11 digital) by David G. Conroy who wrote the compiler for Dec's RSX11M operating system. He did this when he was at the University of Waterloo and finished it at Teklogix in Mississauga where he and I both worked.

        I was the second or third person to use it. Here's a picture of me an Dave at the Teklogix picnic in Terra Cotta. This

    • 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.

  • Happy Birthday gcc!
  • Yay for gcc, always giving me errors and making me actually try to get it right the first time.
  • I still miss putzing around with the compiler from Rick DeSmet to communicate with my dot-matrix printer trying to get it to change fonts. The GCC is a remarkable achievement, and important, but my fondest memories are elsewhere.

  • The best part of the entire linked-to page was the email addressing at the bottom of the announcement. UUCP paths. Those truly were the days.
  • Thank you gnu (Score:5, Insightful)

    by Ada_Rules ( 260218 ) on Thursday March 22, 2012 @08:37PM (#39446765) Homepage Journal
    I remember the first time I built gcc in college on an decstation (probably around 1990) I was thrilled to have a free compiler with source code. It almost seemed like magic. Several years later when the GNAT project started and promised to bring Ada programming to GCC I was even happier but I never really expected it would turn into the high quality Ada compiler that we have today. While HURD never really worked out, the GCC project alone (never mind the vast quantity of other software covered by the GPL) has been transformational and I think many of the younger generation take the existence of this stuff for granted.

    Now, get off my lawn.

  • 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 !!

  • It's not just a compiler, it's also a worldwide political movement.

I have hardly ever known a mathematician who was capable of reasoning. -- Plato

Working...