During it's configure phase, musl's configure script checks if compiler_rt exists by checking if the library libcompiler_rt.a exists, which it doesn't. The compiler_rt package installs only these packages: ### partridge / # equery f compiler-rt * Searching for compiler-rt ... * Contents of sys-libs/compiler-rt-5.0.1: /usr /usr/lib /usr/lib/clang /usr/lib/clang/5.0.1 /usr/lib/clang/5.0.1/lib /usr/lib/clang/5.0.1/lib/linux /usr/lib/clang/5.0.1/lib/linux/libclang_rt.builtins-x86_64.a /usr/share /usr/share/doc /usr/share/doc/compiler-rt-5.0.1 /usr/share/doc/compiler-rt-5.0.1/README.txt.bz2 ### I fixed the issue creating a symlink from /usr/lib/clang/5.0.1/lib/linux/libclang_rt.builtins-x86_64.a to /usr/lib/libcompiler_rt.a I propose that the compiler-rt ebuild should do this automatically.
Created attachment 513562 [details] beginning of configure
Created attachment 513564 [details] emerge --info
Created attachment 513566 [details] full build.log
Steps to Reproduce: 1. Uninstall gcc on musl 2. Install clang 3. Try to compile musl
I am doing this with the compiler as clang, and gcc is uninstalled. /usr/bin/cc is a symlink to clang. This error does not occur under gcc, as musl links against libgcc_s if gcc is installed, alleviating the problem.
Seems this was discussed on llvm mailing list? http://lists.llvm.org/pipermail/llvm-dev/2016-December/108348.html
I think this was fixed a while back: https://git.musl-libc.org/cgit/musl/commit/?id=fcf24b9f388d650a92375079461198f5db3ed88a.