[cs615asa] GCC- chicken and egg

Jan Schaumann jschauma at stevens.edu
Fri Feb 17 21:54:51 EST 2012


Tejas <tnadkarn at stevens.edu> wrote:
> Since you need gcc installed on your system to build gcc from source,
> when would you practically build gcc from source? Is it for specific
> flags/configurations?

You don't need gcc to build gcc.  You need _a compiler_ to build gcc.
You may have another compiler, including possibly an older version.

There are a number of reasons for why you might like to build a compiler
even though you already have a compiler; these include upgrading to a
newer version, adding a different compiler, or cross-compiling for a
different platform/architecture.

The stage of being able to self-compile (aka as "self-hosting") is
rather important in compiler design (see http://is.gd/r35nRt).  When you
guys took your hopefully-still-required compilers class, didn't you
eventually build your own compiler?

-Jan


More information about the cs615asa mailing list