======= 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.
- 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
AMD64/x86_64
Other arches will be supported after first successive build.
- 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
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.
- Build `cctools` with GCC
- 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`.
- Build individually in LLVM source tree libunwind, libcxxabi and libcxx with stage0 clang.
- Build a new stage1 clang with stage0 clang. This new stage1 clang will not have GCC libraries
- Using stage1 clang, build toolchain for use in chroot
- Build final root filesystem in chroot with stage1 clang
- Clang requires `execinfo.h` - Added libexecinfo to build
- 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.
- Genshen's docker-clang-toolchain - https://github.com/genshen/docker-clang-toolchain
- Build a freestanding libc++ - https://blogs.gentoo.org/gsoc2016-native-clang/2016/05/05/build-a-freestanding-libcxx/