[llvm-dev] libc++ failed to link against musl
David Chisnall via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 7 02:14:47 PDT 2017
On 6 Jun 2017, at 21:41, Dmitry Golovin <dima at golovin.in> wrote:
> Neither is the case. The system that I want to build with this toolchain is Linux-based, but not GNUish. I would like to use musl instead of glibc and libc++ instead of libstdc++, only use binutils provided by LLVM. I think that in that case I will link libc++abi and libunwind to libc++ statically, so I will not have to add -lunwind and -lc++abi to my LDFLAGS. Is it okay to do that? There is an experimental LIBCXX_ENABLE_STATIC_ABI_LIBRARY option, I will try to enable it.
> The host system that I'm compiling on is Alpine Linux (musl-based distro), if it matters.
It probably makes sense for libc++abi or libcxxrt, but it makes less sense for libunwind because C libraries that need to interoperate with C++ will link with this (by default assuming libgcc_s.so provides the relevant symbols). If both do then you’re going to have conflicts, if libgcc_s.so or equivalent doesn’t then you’re going to have link failures in pure-C programs that use C/C++ compatible libraries.
More information about the llvm-dev