In association with heise online

Scratching the compiler

One of the selling points for Stampede Linux had been that it used pgcc, and was optimised for the Pentium processor. pgcc was a fork of the Free Software Foundation's gcc compiler project.

At the time, work on gcc was in a state of flux. As David Wheeler tells it: "In 1997, there were disagreements over the development approach and slow development speed of gcc. In particular, many were dissatisfied with the FSF-appointed gcc maintainer, who was very slow to accept changes."

The complaint of developers was that gcc was "part of the FSF's publicity for the GNU project, as well as being the GNU system's compiler, so stability is paramount for them. On the other hand, Cygnus, the Linux folks, the pgcc folks, the Fortran folks and many others have done development work which has not yet gone into the gcc2 tree despite years of efforts to make it possible."

As a result there were several forks of the code. The g77 fork supported Fortran 77 compilation. pgcc focussed on the Pentium processor. Other amendments weren't accepted by the gcc maintainer, and as a result, progress was impeded across the Linux ecosphere.

The competing projects came together under the auspices of Cygnus Solutions, now absorbed by Red Hat, and who decided "to start a more experimental development project, just like Cygnus and the FSF started the gcc2 project about 6 years ago. Only this time the net community with which we are working is larger! We are calling this project 'egcs' (pronounced 'eggs')."

Poached egcs

But not all of the participants in the compiler game played nicely. Cygnus had an x86 backend for gcc that was absorbed into its CodeFusion product which, according to Robbins, "increased the performance of some of the CPU-intensive executables (like bzip2) by close to 90 per cent! All applications seemed to benefit from at least a 10 per cent real-world performance increase, and all we did was swap out compilers. Enoch even booted 30 - 40 per cent faster. The performance gains were far, far greater than we gained by switching from gcc to pgcc."

But although the x86 backend was released under the GPL, Cygnus "strongly urged" the Enoch developers "not to use or include the compiler sources with Enoch." Robbins saw this as "a good example of a situation where the GPL prevented a company from creating a proprietary product based on open sources. My educated guess is that Cygnus was afraid that if we used their compiler we would undermine their boxed product sales...".

Eventually the CodeFusion compiler code, including the x86 backend, was absorbed into gcc 2.95.2. As Wheeler recounts, "Egcs worked at an accelerated pace, and soon surpassed the original gcc project. In April 1999 the rift was healed; the FSF agreed to switch to using the egcs code for gcc, and the egcs project agreed to dissolve itself and take over the original gcc project."

This was a significant time in the history of Gentoo, for the simple reason that compilers matter in a world where performance is everything and code is compiled on the fly. When the egcs fork replaced gcc, all GNU and Linux distributions became faster, and many of Enoch's earlier problems went away.

Port in a storm

Over time, Robbins and Enoch gained a team of developers, and Enoch began to evolve into Gentoo Linux, but not before problems with gcc, and a posix thread bug in glibc and the Linux 2.2 series of kernels, led Robbins to abandon Gentoo during the latter half of 1999 and dip into the very different world of FreeBSD.

This episode led to Gentoo development being influenced by FreeBSD's ports system. "Unlike the Linux approach, ports didn't use binary packages but instead automatically compiled everything locally from their original sources." FreeBSD ports became the inspiration for Gentoo's portage system. "Portage is the heart of Gentoo Linux", Robbins explained, "and is more than a simple package management or maintenance system."

"Portage is our way of opening up Linux technology to others," he wrote. "By studying the autobuild scripts, you can see how all the various packages fit together into a unified whole. If necessary, you can grab our entire CVS tree and hack away at it, producing your own custom distribution of Linux-based technology. We believe that this is a good thing – we want to give people the knowledge they need to take Linux into new realms."

Robbins has said he was persuaded to rejoin Enoch by Achim Gottinger, and the name was changed to Gentoo on the suggestion of Bob Mutch. The first point release of Gentoo 1.0 on April Fools day, 2002, proclaimed "Unlike other distros, Gentoo Linux has an advanced package management system called Portage. Portage is a true ports system in the tradition of BSD ports, but is Python-based and sports a number of advanced features including dependencies, fine-grained package management, 'fake' (OpenBSD-style) installs, path sandboxing, safe unmerging, system profiles, virtual packages, config file management, and more."

Robbins remained as the benevolent dictator and chief architect of Gentoo until 2004, when he resigned, wanting to spend more time with his family. Before abandoning Gentoo, Robbins set up a non-profit Gentoo Foundation, and gave it ownership of all his copyrights and trademarks.

Next: Mickey mousing

Print Version | Permalink: http://h-online.com/-1327656
  • 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