Skip to content

Minimal musl-based Linux C development environment able to bootstrap itself, with statically linked binaries fully compiled with slimcc.

Notifications You must be signed in to change notification settings

fuhsnn/slimcc-musl-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Building

  • Install Bash, GNU make, GNU binutils, and POSIX.1-2008 cc + libc
  • cd to a clean directory, put slimcc source in ./slimcc
  • Run the script, a rootfs will be created, (default name is ./rfs)
  • chroot with your favorite method (I use systemd-nspawn -D)
  • Optionally, repeat inside the chroot as stage2 bootstrap

TL'DR of the bootstrap script

  • build slimcc
  • build musl with the just-built slimcc
  • build the rest of binaries statically linked to the just-built musl, with the just-built slimcc

What's included?

slimcc
musl
toybox
GNU bash
GNU binutils
GNU make
GNU wget
OpenBSD mg
OpenBSD oksh
OpenBSD libtls (for wget https support)

The tools chosen may not be as "minimal" as one expected, however it is the minimum requirement to compile musl (needs gmake) and toybox (needs bash) without rewriting their build process. As I do this from the perspective of a compiler maintainer, modifying projects to fit minimalism does not interest me as much as improving slimcc to be able to compile their dependencies.

mg and oksh are the text editor and interactive shell of choice. toybox vi is also enabled in case anyone prefer it.

Inspirations

About

Minimal musl-based Linux C development environment able to bootstrap itself, with statically linked binaries fully compiled with slimcc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages