Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Nils M Holm" Newsgroups: comp.compilers Subject: Re: Self compiling compiler Date: Thu, 31 Mar 2016 19:41:24 +0200 Organization: Compilers Central Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-03-016@comp.compilers> References: <16-03-013@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="88661"; mail-complaints-to="abuse@iecc.com" Keywords: C, tools Posted-Date: 31 Mar 2016 15:59:14 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1688 ERSHC wrote: > I'd like to teach an undergraduate class based on the Thompson hack > (see Ken Thompson's Turing Award lecture). I don't want to write a > "whole" compiler, so need a compiler that can compile itself, > preferably one that runs under Linux and is reasonably small. Can > anyone point me to something more appropriate than gcc (which is far > from small)? For something really small, check out Lindberg's Foogol. Here's a version I converted to C89: http://www.t3x.org/files/foogol5.shar.Z For something more complete, but still much simpler than GCC, have a look at SubC: http://www.t3x.org/subc/index.html There's also a book describing its internals: http://www.t3x.org/reload/index.html (Yes, I'm the author!) There are various other small compilers, from very simple ones to multi-platform optimizing compilers on my home page. Feel free to look around! -- Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org