unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: rui314@gmail.com
Cc: guile-user@gnu.org
Subject: on using 8cc in reproducible bootstrap process
Date: Sun, 18 Jun 2017 15:52:23 +0200	[thread overview]
Message-ID: <87d1a1csiw.fsf@gnu.org> (raw)

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

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



             reply	other threads:[~2017-06-18 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18 13:52 Jan Nieuwenhuizen [this message]
2017-06-18 14:53 ` on using 8cc in reproducible bootstrap process Mike Gran
2017-06-18 22:39 ` Rui Ueyama

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1a1csiw.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=rui314@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).