3 ms·
A not-yet-fully-upstreamed branch maintained by the linux foundation can, yes. But just like FreeBSD has to make an exception to build certain packages with gcc
by cm3 10y ago
A not-yet-fully-upstreamed branch maintained by the linux foundation can, yes. But just like FreeBSD has to make an exception to build certain packages with gcc, the kernel can be exclusively built with gcc for the time being. If you're not using musl libc, I guess glibc might also require gcc but that's an unsurprising coupling, likely due to gcc C extensions in use.
The important points are that such a distro will quickly improve the situation of clang and libc++ compatibility across the board and exercise the alternative toolchain a lot more. In fact, there isn't much incompatible code out there, and it's been fixed mostly due to efforts of Debian, FreeBSD and of course Apple and Bitrig and Gentoo. FreeBSD is the leading force behind making lld a viable alternative to binutils ld and so far ThinLTO (which works with binutils, to be clear) is exclusive to llvm, so there's that.
https://aur.archlinux.org/packages/llvmlinux-git/ https://aur.archlinux.org/packages/llvmlinux-git/
http://llvm.linuxfoundation.org/index.php/Main_Page http://llvm.linuxfoundation.org/index.php/Main_Page
- bogomipz 10y agoCan you remind me why LLVM/CLANG can't compile the linux kernel? Is it dependance on GCC extensions?
- justincormack 10y agoI think those are mostly fixed for C code, but assembly still has issues. Otherwise dependence on exact gcc behaviour is an issue.
- bogomipz 10y agothanks
- valarauca1 10y agoTL;DR Yeah GCC specific compiler compiler extensions. GCC has some platform specific symbols that are really just functions wrapping assembly. Most of this is related to crypto and AESNI (built in x86 AES operations). This breaks some crypto, which breaks some wifi/file system stuff. XEN driver uses a GCC specific ASM macro for counting NUMA Nodes and CPU cores. Dynamic compiling within the kernel for say BSD Packet Filtering JIT requires LLVM Compiler-RT have a custom wrapper. Also some libgcc specific header information.