In association with heise online

27 August 2010, 14:56

GCC - 'We make free software affordable'

by Richard Hillesley

GCC and GNU Emacs are the two facets of the GNU operating system that have probably done more than any other to take GNU and free software from idealistic concept to a utilitarian reality. Having previously looked at GNU Emacs and the Hurd, Richard Hillesley looks at the history and progress of GCC.

GCC began life as the GNU C Compiler and achieved its first release on March 22, 1987. Michael Tiemann, who contributed as much as anyone to the later development of GCC, and who had dreamed of writing the perfect compiler, said that the day of GCC's release was "the most thrilling and most terrifying day of my life (up to that point)."

"I had a decision to make," he wrote on the twentieth anniversary of Richard Stallman's first release of GCC. "I could join him, I could compete with him, or I could pick a new dream. I downloaded GCC version 1.0 and began a collaboration that would last for ten years (when, due to RSI, I gave up programming as a mainstream activity.)"

Finding relevancy

NS 32032 CPU
Tiemann studied the code and began a port of GCC to the National Semiconductor 32032. "Two weeks to the day after I downloaded the compiler from the Free Software Foundation I had it generating code that was 20% faster than the code coming from the National compiler."

"Within hours of posting an announcement of this new port," Tiemann wrote, "it became obvious to me and to others that there were many optimisations I had not yet implemented." Within another two weeks, Tiemann was generating code that was 40% faster than the original compiler. This was important because the National Semiconductor 32032 had been sold as a 1 MIPS chip (able to execute one million instructions per second) but benchmarked at a mere 0.75 MIPS, and was "headed for commercial irrelevancy" until the intervention of Tiemann and GCC.

Tiemann wrote, "With my 32032 port, the chip benchmarked above 1 MIPS, proving to me that the hardware guys had delivered, but the software guys had not." The more important lesson was that "there were already sufficiently many people to make a collaborative process very successful."

By the beginning of 1988 the first stable release of GCC was out, Tiemann had contributed the GNU C++ Compiler, and the job had begun to port GCC to other architectures. It was a propitious time for a free compiler. Compilers didn't come cheap, and portability was at a premium.

Despite the occasional arguments and setbacks, GCC has been developed continuously ever since, and is almost certainly the most widely used compiler software in the world. GCC includes front ends and libraries for C, C++, Objective-C, Fortran, Java and Ada, and is used to build virtually all GNU/Linux systems. GCC is also used on Android, FreeBSD, NetBSD, OpenBSD, on embedded RTOS systems, on Solaris, AIX, and HP-UX, and even on Microsoft Windows with an astounding variety of architectures.

Free not free

Stallman announced the GNU project in September 1983, and knew it wasn't going to be easy.

From the beginning he looked for tools that were nominally free and could simplify his task. Trix and BSD were considered as options for the kernel, and he looked into the possibility of using the Free University Compiler Kit, believing that "with a name like that" it would be free.

Andy Tanenbaum, the author of the Compiler Kit, took a different view. "No, the university might be free," he said, "but the software they develop isn't". He proposed instead that Stallman make utilities for the kernel that Tanenbaum was writing and distribute them with his proprietary compiler.

Stallman's response was "that this was despicable and so I told him that my first project would be a compiler."

Next: Off-colour Pascal

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit