Re:Building the Linux kernel with clang
by taeric on Thursday September 21, 2017 @12:37PM
(#15305169)
But my counter evidence was that these extensions were required to actually build the kernel. Which is also somewhat self-evident.
So my question to you is if you have evidence that those extensions are not required to actually build the kernel? I get that they are the "sticking" point to moving to clang. But are they also required for the kernel to actually do its job?
Re:Building the Linux kernel with clang
by Sir_Cmpwn on Thursday September 21, 2017 @02:55PM
(#15306357)
I see what you mean. Yes, there are counter examples of kernels that can be compiled without extensions. With my rough knowldge of the Linux kernel in particular, I imagine there are a few places where the use of extensions makes for much better code than without, and for those places the change is of debatable utility. However, extensions are the rule rather than the exception for the kernel. The bulk of the kernel could be written without them.
- Multi-year effort by Clang, a well regarded standards-compliant C compiler, to support the kernel
- Proprietary extensions do not conform to the same strict guidelines for specifications as the C standard and may require reverse engineering to implement correctly
- C is defined by the C specification and Linux is not written in C by this metric
- Therefore, C compilers cannot compile the kernel
Correct me if I'm wrong but I cannot extract similar facts from your comment.