News for hackers. Stuff that matters.
Re:A minimal C compiler in x86 assembly by pabs3 on Tuesday May 03, 2022 @12:47AM (#31244745)
This was created as part of the Bootstrappable Builds project to go from an MBR of machine code plus a ton of source all the way up to a full distro.

https://bootstrappable.org/

Re:A minimal C compiler in x86 assembly by loudmax on Tuesday May 03, 2022 @09:32AM (#31248080)
The Goals section from the projects main page are pretty interesting: https://github.com/oriansj/stage0

  This is a set of manually created hex programs in a Cthulhu Path to madness fashion. Which only have the goal 
  of creating a bootstrapping path to a C compiler capable of compiling GCC, with only the explicit requirement 
  of a single 1 KByte binary or less.

  Additionally, all code must be able to be understood by 70% of the population of programmers. If the code can 
  not be understood by that volume, it needs to be altered until it satisfies the above requirement.
Very cool project, but I guess I won't hold out for compiling a working web browser from this project.
Re:A minimal C compiler in x86 assembly by adrian_b on Tuesday May 03, 2022 @10:29AM (#31248760)
With a working gcc, you should be able to compile all that is needed to build Chromium and Firefox.

There are a few programming languages that cannot be bootstrapped from a C or C++ compiler, so you need a binary executable of a previous compiler version for that language, but I do not think that Chromium uses any of those.

The bootstrapping of Rust is complex, but AFAIK it is possible using mrustc. Then you should be able to also compile Firefox.

Re:A minimal C compiler in x86 assembly by harha on Tuesday May 03, 2022 @03:07AM (#31245547)
This is pretty cool, there's so much value in knowing how to create things, same as in manufacturing, producing drugs etc.

I would love to get guided through how they wrote this.