Aalbus-linux / Aalbus

The master repository for the Aalbus distribution
Other
22 stars 0 forks source link

linking clang against musl rather than glibc #10

Open nickdesaulniers opened 3 years ago

nickdesaulniers commented 3 years ago

I've been trying to figure out how to that. I was looking at https://github.com/Aalbus-linux/Aalbus/blob/main/dest/etc/mk.d/mk.llvm-options and wondering if this was already supported via upstream LLVM cmake options?

staalmannen commented 3 years ago

Ever since LLVM 12 is it far easier to build against musl (historically has a big pain been sanitizers in compiler-rt).

I have always built on a musl-based OS (first time on gentoo-musl, which was the first "embryo" of Aalbus, then using ngtc on an Alpine linux docker image). I am not sure that all the mk.llvm-options are needed anymore, but I am using those at the moment and package the llvm toolchain using pkgsrc. I am not patching the sources at all (if you have downloaded the latest image you can see the packages /usr/pkgsrc/lang/llvm etc).

The thing I have experienced both times when I first bootstrapped llvm was that I had to build the toolchain a few times to get rid of some gcc contamination (some atomics symbols etc).