Coder Social home page Coder Social logo

clang-musl overlay

Overlay containing experimental clang-musl profile and related ebuilds.

Prequisite

  • A working gentoo/musl system.
  • Self-hosted clang compiler, with the default-libcxx USE flag enabled.
  • Some knowledge of compilers, linkers and gentoo's package manager portage.

Installation

  • Create a new file /etc/portage/repos.conf/clang-musl.conf with the following contents:
[clang-musl]
sync-uri = https://github.com/clang-musl-overlay/clang-musl-overlay.git
sync-type = git
location = /var/db/repos/clang-musl
sync-depth = 1
  • Sync this new repo using emaint sync -r clang-musl or emerge --sync

Profiles

clang-musl overlay provides clang-musl and clang-musl/hardened profiles

Switching to clang-musl profile:

  • Use eselect to list all the profiles. Note the new profile and select the profile
eselect profile set --force <profile>

Setting clang and llvm binutils as default

  • Switch to clang-musl profile
  • Unmerge gcc, binutils and their dependencies with a --depclean. emerge -c
  • Merge sys-devel/llvm-conf. This should automatically set latest llvm/clang as your default toolchain.
    • Or you can run llvm-conf --enable-native-links --enable-clang-wrappers --enable-binutils-wrappers llvm-14
  • Now you can run emerge -1euDN @world to rebuild everything with clang/llvm.

Issues

  • Programs may fail to build when using clang. There are already patches for known issues at gentoo-patchset.
  • LTO and other optimization may lead to build issues for some pkgs. Please report if you find any issue.

clang-musl-overlay's Projects

gentoo-patchset icon gentoo-patchset

Patchset containing fixes for a working LLVM + Musl Gentoo installation

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.