From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Removing compilers that cannot be bootstrapped Date: Tue, 22 Mar 2016 17:25:52 +0100 Message-ID: <87bn66tr73.fsf@gnu.org> References: <87twjz4fcn.fsf@gnu.org> <20160322095628.GA13538@novena-choice-citizen.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiP83-00007f-Jo for guix-devel@gnu.org; Tue, 22 Mar 2016 12:26:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiP7y-0002AX-K7 for guix-devel@gnu.org; Tue, 22 Mar 2016 12:25:59 -0400 In-Reply-To: <20160322095628.GA13538@novena-choice-citizen.lan> (Jookia's message of "Tue, 22 Mar 2016 20:56:28 +1100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Jookia <166291@gmail.com> Cc: guix-devel Jookia <166291@gmail.com> skribis: > On Mon, Mar 21, 2016 at 11:48:40PM +0100, Ludovic Court=C3=A8s wrote: >> Often, in their implementation history, compilers are boostrapped from >> something else initially, and only later to they become self-hosted and >> unbootstrappable. >> >> So in theory, it=E2=80=99d be possible to find, say, an old-enough GHC t= hat only >> requires a C compiler (?), and use that to build the next version and so >> on, until we reach the latest version. I suspect the same applies to >> many compilers. > > I'm not sure about this. Bootstrapping older compilers means there's ofte= n less > support for the platform you're on, which means we'll end up in a situati= on > where we're bootstrapping from machines and cross-compiling, and I forsee= the > problem being that we'll have to rely on nonfree code or machines as our = huge > backhaul in a decade where we're on some cool free hardware RISC architec= ture. > > For instance, to run GHC on ARM you can only use a recent GHC, all the old > versions didn't support it. Sure you could go from C to get an old GHC on= ARM, > but it wouldn't have support for outputting ARM assembly. Good point, indeed. >> For GCC, an idea discussed at >> would >> be to build GCC=C2=A04.7 (the last version written in plain C) with some= thing >> more auditable like TinyCC, and then use this g++=C2=A04.7 to build what= ever >> GCC version we want. Again, sounds like it should work, but we need to >> actually try. > > Sounds interesting, and even better if we could compile the rest of the > bootstrap with just TinyCC. Yes, though we need a C++ compiler anyway to build current GCCs. >> BTW, the =E2=80=9Cgood news=E2=80=9D is that more and more compilers bui= ld upon LLVM, >> and for those there=E2=80=99s no bootstrapping problem if we take the C++ >> compiler for granted. > > Is this true? I know a lot of compilers *use* LLVM as a backend, but not = sure > about their frontends. Right, it may be that front-ends are still mostly written in the target language. Ludo=E2=80=99.