guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

on using 8cc in reproducible bootstrap process


From: Jan Nieuwenhuizen
Subject: on using 8cc in reproducible bootstrap process
Date: Sun, 18 Jun 2017 15:52:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

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 <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]