Coder Social home page Coder Social logo

gentoo-patchset's Introduction

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.

gentoo-patchset's People

Contributors

capezotte avatar demiank avatar formula-spectre avatar king-mucus avatar leonardohn avatar mazunki avatar radiant-knight avatar uidops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gentoo-patchset's Issues

Package “sys-libs/db” failing to build correctly with lld linker

The sys-libs/db package fails to build correctly with the lldlinker. To fix this issue, we need to remove or comment out "append-ldflags -Wl,--default-symver" from the ebuild, as well as removing "tc-force-bfd" and "binutils" as a dependency in the ebuild. However, even if db builds with lld under these conditions, it still makes many references to binutils in the result. This can lead to errors in runtime, so manual patching is required.

Issue crossposted to "clang-musl-overlay"

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.