Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone know the state of the project to compile Linux Kernel with clang? Does this release help with such a goal?


From an August 23 email ( https://lists.linuxfoundation.org/pipermail/llvmlinux/2017-A... )

Over the past months efforts have been made to upstream the remaining LLVMLinux patches (http://llvm.linuxfoundation.org) and to address other outstanding issues in order to build a usable kernel with clang. To my knowledge upstream is in a relatively good shape by now for x86 and arm64 (I heard the same about PowerPC, but have no first hand experience), most of the patches are already in Linus' tree, others have landed in maintainer trees.

...

It goes on, but there has been some pretty significant work done, and you can easily compile with clang as your default cc with simple patches.


I don't recall seeing much recent activity on the mailing lists along these lines.

I have a very vague recollection that Linux may be dependent on gcc specific features that clang doesn't intend to support?

EDIT: "One of the major compilation problems with LLVM/CLang is that they do not support VLA’s ... widely used inside the linux kernel." from [1]

There was some activity over the prior six months or so to get lld to link the kernel (can't recall if it was built by gcc or clang for those tests).

[1] https://www.quora.com/What-is-the-state-of-the-art-of-compil...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: