Skip to content

Stable, Security, Privacy focused independent Linux distribution for x86, musl-libc, built with hardened LLVM/Clang toolchain, non-GNU

Notifications You must be signed in to change notification settings

plan10os/plan10

Repository files navigation

plan10

======= This is based on Linux From Scratch (www.linuxfromscratch.org) but with the goal of building a system with clang & friends from LLVM and Musl Libc.

Specification

  • C Runtime Library (system libc): Musl
  • Default C Compiler: clang (LLVM)
  • Default C++ compiler: clang++ (LLVM)
  • Default linker: lld (LLVM)
  • C++ standard library: libcxx (LLVM)
  • C++ ABI library: libcxxabi (LLVM)
  • Unwinding Library: libunwind (LLVM)
  • Init system: skarnet's S6 & S6-rc
  • Device manager: Udev
  • TLS Implementaion: LibreSSL
  • System Shell: Bash
  • System Gettext: gettext-tiny

Supported Architectures

AMD64/x86_64

Other arches will be supported after first successive build.

Goals

  • Build a toolchain with LLVM but without GCC
  • Build a toolchain (llvmtools) with LLVM but without GCC
  • Build final root filesystem with LLVM
  • Set default linker as lld(LLVM)
  • Set default C++ standard library as libcxx(LLVM)
  • Set default C++ ABI library as libcxxabi(LLVM)
  • Set default stack unwinding library as libunwind(LLVM)
  • Eliminate dependacy on GCC's libgcc_s

Current Method

Build or use 'cctools' from Musl-LFS to cross-compile stage0 clang. This stage0 clang will still link to libgcc_s but will later be used to build a clang free of libbgcc_s. The goal is to build clang+friends with clang and not GCC.

  1. Build `cctools` with GCC
  2. Build a stage0 clang with GCC libraries with `cctools`: build clang via llvm source with clang+lld unpacked in `llvm/tools` and libunwind, libcxxabi & libcxx in `lvm/projects`.
  3. Build individually in LLVM source tree libunwind, libcxxabi and libcxx with stage0 clang.
  4. Build a new stage1 clang with stage0 clang. This new stage1 clang will not have GCC libraries
  5. Using stage1 clang, build toolchain for use in chroot
  6. Build final root filesystem in chroot with stage1 clang

Issues

  • Clang requires `execinfo.h` - Added libexecinfo to build

Change log

  • 0.1.3: configure Stage1 clang correctly with x86_64-pc-linux-musl.cfg.
  • 0.1.2: Use stage0 to build a stage1 clang...Stage1 clang will be used in chroot
  • 0.1.1: Build stage 1 clang by building clang, lld, compiler-rt, libunwind, libcxxabi, libcxx together in llvm source tree
  • 0.1.0: Build cctools with GCC to build stage 1 clang... first build libunwind, libcxxabi & libcxx - stage1 Clang broken
  • 0.0.0: First attempt, modeled afer Genshen's repo: Stage 2 clang fails to build.

Projects of Interest

About

Stable, Security, Privacy focused independent Linux distribution for x86, musl-libc, built with hardened LLVM/Clang toolchain, non-GNU

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published