From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.user Subject: on using 8cc in reproducible bootstrap process Date: Sun, 18 Jun 2017 15:52:23 +0200 Organization: AvatarAcademy.nl Message-ID: <87d1a1csiw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497793971 23291 195.159.176.226 (18 Jun 2017 13:52:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 13:52:51 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org To: rui314@gmail.com Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 18 15:52:47 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMadD-0005ld-4t for guile-user@m.gmane.org; Sun, 18 Jun 2017 15:52:47 +0200 Original-Received: from localhost ([::1]:38455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMadI-0003Rs-Bn for guile-user@m.gmane.org; Sun, 18 Jun 2017 09:52:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMacw-0003Rm-5B for guile-user@gnu.org; Sun, 18 Jun 2017 09:52:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMact-0006Jw-1x for guile-user@gnu.org; Sun, 18 Jun 2017 09:52:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMacs-0006Js-Uj; Sun, 18 Jun 2017 09:52:26 -0400 Original-Received: from peder.onsbrabantnet.nl ([88.159.206.46]:36912 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dMacs-00008o-9j; Sun, 18 Jun 2017 09:52:26 -0400 X-Url: http://AvatarAcademy.nl X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13846 Archived-At: Hi! I am working to create a full source bootstrap path for GuixSD[0]. I have written Mes[1] a mutual self-hosting Scheme interpreter prototype in C and a C compiler (Mescc) in Scheme. The prototype Scheme interpreter in C will be redone in stage0's hex2[2] at an opportune moment which will give us a real simple C compiler (Mescc) that does not depend on any binary. The next leap forward is to compile gcc. I have been looking at compiling Tinycc[3]. A couple of weeks ago, rain1 has been working with the tcc developers to succeed in compiling gcc using tcc[4]. However, tcc uses many esoteric language features which makes bootstrapping using tcc pretty [unnecessarily?] difficult. That is why I was happily surprised to read about 8cc's advertised bootstrappability 8cc is a compiler for the C programming language. It's intended to support all C11 language features while keeping the code as small and simple as possible. However, I'm currently stuck on 8cc's use of anonymous unions and 8cc's anonymous structs in unions. To me, as a fresh C compiler writer, those are pretty esoteric language features too. The idea of having to implement those discourages me a bit. Do you think 8cc should be used in my efforts to create a full source bootstrap path (rather than tinycc, or as a stepping stone to tcc)? If so, I can think of two strategies 1) a. implement anonymous unions in Mescc b. implement anonymous structs (inside anonymous unions) in Mescc 2) remove anonymous unions and structs from 8cc which one would you advise, or do you have a better alternative? Should I 1) learn about anonymous structs and make Mescc richer, or would you like to (help and) take patches for 2)? Greetings, janneke [0] https://gnu.org/s/guix [1] https://gitlab.com/janneke/mes [2] https://github.com/oriansj/stage0 [3] https://bellard.org/tcc/ [4] http://lists.nongnu.org/archive/html/tinycc-devel/2017-05/msg00103.html --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com