161 lines
8.2 KiB
HTML
161 lines
8.2 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title>GCC News LG #25</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H2>Compiler News</H2>
|
|
<h4>By <a href="mailto: layers@marktwain.net">Larry Ayers</a></h4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<center><h3>Introduction</h3></center>
|
|
|
|
<p>The GNU gcc compiler is one of the most highly-regarded applications made
|
|
available by the Free Software Foundation; it has become an integral part of
|
|
Linux distributions. The existence of gcc and its corollary utilities (make,
|
|
autoconf, etc.) makes it possible to distribute source code for everything
|
|
from the Linux kernel itself to a wide variety of free software applications
|
|
and utilities. This fact is crucial to the survival and health of Linux;
|
|
different people run different kernels and distributions, and it would be
|
|
expecting too much to ask volunteer developers to create binary distributions
|
|
for all of the different flavors and variations of Linux and other
|
|
Unix-derived operating systems. Richard Stallman does have a valid point when
|
|
he emphasizes Linux's dependence upon the many GNU utilities.
|
|
|
|
<p>Lately there has been a flurry of activity in the GNU gcc compiler world,
|
|
resulting in new releases and giving Linux users expanded choices in their
|
|
development environments.
|
|
|
|
<p>The GNU people operate in a relatively closed environment; the average user
|
|
doesn't have access to news or progress reports; a new release is usually the
|
|
first indication that development is actually progressing. Since GNU software
|
|
is released under the GNU licence, there is nothing to stop other developers
|
|
from modifying the code and making available variant releases. There exists
|
|
another approach to free software development, in which patches and
|
|
"snapshot" releases are freely available for interested developers and users.
|
|
The Linux kernel (with both stable and unstable development releases
|
|
available) is an obvious and influential example. XEmacs, KDE, and GNOME are
|
|
others. Since the advent of egcs it seems the GNU developers might be moving
|
|
toward this development model, judging by some new material at the
|
|
<a href="http://www.gnu.org">GNU</a> web-site.
|
|
|
|
Eric Raymonds' online
|
|
<a href="http://http://www.ccil.org/~esr/writings/cathedral.html"> article</a>,
|
|
<b>The Cathedral and the Bazaar</b> is an insightful and interesting
|
|
interpretation of these two different models of free software development.
|
|
This piece was one of the inspirations for the first gcc variant (that I know
|
|
of) to become available: egcs.
|
|
|
|
<center><h3>egcs</h3></center>
|
|
|
|
<p>Gcc 2.7.2 has been the standard GNU compiler for some time now. The <a
|
|
href="http://www.cygnus.com">Cygnus Corporation</a> is a company which offers
|
|
commercial support for the GNU utilities and has ported many of them to the
|
|
Windows environment. A group of programmers there decided to try an
|
|
experiment. Beginning with the stock GNU sources, they adapted the patches
|
|
which would eventually become gcc-2.8.0 (I assume from the GNU gcc development
|
|
source tree) and added experimental features which the GNU developers either
|
|
weren't interested in or were delaying for a future release. The idea was to
|
|
make periodic snapshot releases freely available with the hope of attracting
|
|
more developers. This approach seems to be working; I don't know how many new
|
|
programmers are contributing to the project, but the two releases they have
|
|
made to date (1.00 and 1.01) are being used by quite a few people without
|
|
many problems. Any fruitful changes in gcc/egcs will be available to the GNU
|
|
gcc developers for possible inclusion in future releases. This benefits
|
|
end-users as well as the GNU programmers, as users get to try these new
|
|
features and functions (and hopefully bugs will be reported and dealt with),
|
|
while the sources may be of use to the GNU gcc people in their efforts.
|
|
|
|
<center><h3>pgcc</h3></center>
|
|
|
|
<p>Both the gcc and egcs compilers are intended to be built and used on
|
|
systems based on a variety of processors. Yet another group of developers has
|
|
hacked the egcs code to support operations peculiar to the Intel Pentium
|
|
processors. Pgcc consists of a set of patches which can be applied to the egcs
|
|
source, which will allow code to be compiled with various pentium
|
|
optimizations. These developers claim execution speed (of binaries
|
|
compiled with pgcc) can be five to thirty percent faster than stock gcc. A
|
|
new Linux distribution called <a href="http://www.stampede.org">Stampede</a>
|
|
is using pgcs to compile the binaries of the kernel and
|
|
applications which they plan to distribute. Interestingly enough, the
|
|
original patches which the pgcc team used as a starting point came from a
|
|
programming team at Intel.
|
|
|
|
<center><h3>My Experiences</h3></center>
|
|
|
|
<p>Though the GNU gcc compiler has always worked well for me, the appeal of
|
|
novelty led me to tentatively experiment with egcs when the first real release
|
|
appeared on the <a href="http://www.cygnus.com/egcs">egcs web-site</a> late
|
|
last year. The first thing I noticed was that the compiler tends to generate
|
|
more warnings than the <kbd>-Wall</kbd> switch did with gcc 2.7.2. These
|
|
don't seem to have deleterious effects, and I've heard gcc 2.8.0 exhibits the
|
|
same tendency. Everything I tried seemed to compile successfully except for
|
|
the KDE source; I've been told that this will be fixed for KDE beta 3. If
|
|
you've never built a version of gcc from source be prepared for a long,
|
|
disk-space-intensive compilation. It happens in several stages; during the
|
|
last of these the compiler actually compiles itself, a process known as
|
|
boot-strapping.
|
|
|
|
<p>Some time after installing egcs I happened upon the
|
|
<a href="http://www.goof.com/pcg/index.html">pgcc</a> web-site. I downloaded
|
|
a large set of patches and patched the egcs source, ending up with another
|
|
compiler. Along with the claimed execution speed increase (which in most
|
|
cases probably isn't large enough to be noticeable) optimization can be
|
|
increased to <kbd>-O6</kbd>, and a pentium-specific flag
|
|
(<kbd>-mpentium</kbd>) can be used. The binaries generated tend to be
|
|
substantially larger than gcc's due to the default inclusion of
|
|
exception-handling. This can be disabled with the switch
|
|
<kbd>-fno-exceptions</kbd>.
|
|
|
|
<p>So far I've compiled several Linux kernels, XEmacs, mutt, slrn, the Gimp,
|
|
gzip, bzip2, and others without any problems. I wish I was a systematic type
|
|
of person and had timed the execution of these programs before and after using
|
|
egcs/pgcc, but I'm not. As an example, I'm running XEmacs 20.5 beta-22 using
|
|
the Linux kernel 2.1.84, and the editor seems snappier and more responsive
|
|
than before. But is this due to the compiler, the kernel, the XEmacs version,
|
|
or (most probably) all three? Too many variables and not enough time!
|
|
|
|
<p>I wouldn't recommend installing any of these gcc variants unless you are
|
|
willing to monitor newsgroups, web-sites, and possibly the mailing-lists.
|
|
Luckily problems and work-arounds are reported quickly, and of course the
|
|
invaluable safety-net of gcc distribution packages is always there if your
|
|
set-up gets badly hosed. It will be interesting to see what comes of this
|
|
non-adversarial fork in the evolution of gcc.
|
|
<p>
|
|
<!-- hhmts start -->
|
|
Last modified: Sat 31 Jan 1998
|
|
<!-- hhmts end -->
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1998, Larry Ayers <BR>
|
|
Published in Issue 25 of <i>Linux Gazette</i>, February 1998</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./lopes.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./ayers2.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|