Giter Club home page Giter Club logo

plan10's Introduction

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

plan10's People

Contributors

plan10os avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.