Bootstrappable

From ArchWiki

Bootstrappable Builds allows us to bootstrap Arch Linux easily from scratch using a minimal set of binaries. Allowing a minimal set of binaries to be audited and together with reproducible builds provide confidence that you are running the code which you expect to run.

Bootstrapping Arch Linux

Mes is a project which can be utilised to bootstrap Arch Linux from a minimal set of (32bit) binaries having the rest of the system compiled from source code. For Arch Linux we can start bootstrapping a C compiler from mes and later reduce the initial bootstrap binaries to a minimal auditable amount.

The roadmap to bootstrapping GCC:

  • Bring Mes into the repository
  • Compile Mes with Mes (and compare it with other distributions Debian, Guix, NixOS)
 MES=mes AR=mesar CC=mescc ./configure.sh --host=i686-unknown-linux-gnu
 V=2 MES=mes AR=mesar GUILE_LOAD_PATH=/usr/share/mes/module/ ./bootstrap.sh
  • Compile a patched tcc-boot0
  • Compile a tcc-boot with a tiny patch
  • System utilities
  • GCC-2.95.3 (GCC 4.0.4 can also be bootstrapped directly from TCC if musl libc is built first)

More information:

Bootstrapping Languages

For languages which are self-hoisting (require itself to build a new version) we want a path from a C compiler to for example Rust.

Rust

There is a Rust C++ implementation which can compile Rust 1.19.0 called mrustc. Guix has more information in this blog post.

Java (openjdk)

A path to bootstrapping JDK is described here