GSoC 2016: code submission status

This post serves as a tracker of code submitted in the domain of this GSoC project.

This summer, I worked out a bunch of patches that enhance clang/llvm with support for musl-libc, and had those patches contributed upstream. With these patches, clang is now able to correctly link binaries with musl.

llvm musl-libc support:

clang musl-libc support:

There’s still a pending compatibility issue that prevents llvm itself from being built on musl as is. musl and llvm’s developers have different views on this issue [1], and I haven’t yet found a solution that pleases both side. Currently we’re using a downstream patch in Gentoo to make llvm and musl compatible [2].

To have clang not link binaries with libgcc, I contributed another patch to clang that allows compiler-rt to be used as the default runtime library:

With those upstream enhancements, I wrote several ebuilds for Gentoo to construct a GCC-free C++ runtime environment, including:

  • create new packages for LLVM’s libunwind and libc++abi
  • enhance libc++ to support libc++abi and libunwind
  • make llvm compatible with musl-libc
  • enhance clang to support libc++ as the default stdlib and compiler-rt as the default rtlib
  • create a profile for using clang as the default compiler in Gentoo

Code submitted to Gentoo:

Code under reviewing for Gentoo:

Once the pending pull requests are merged, I’ll deliver a proper Gentoo stage3 with clang as the default compiler and all packages (except for kernel) built with clang.



4 thoughts on “GSoC 2016: code submission status”

    1. Yeah, I’m considering maintaining a new customized kernel, something like sys-kernel/llvm-sources, with patches from LLVMLinux applied. Using that kernel, we should be able to deliver a Gentoo stage3 with no gcc at all.

    2. I just checked their git repo; the last commit is made in Jan. 2015. It seems this project is no longer actively worked on.

Comments are closed.