Linked by Thom Holwerda on Tue 26th Oct 2010 20:36 UTC, submitted by tyrione
Thread beginning with comment 447238
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
The post notes that neither VDSO or the boot code build correctly with clang. The poster modified the build system to compile these two vital components with GCC. So no, clang can't quite build a working Linux kernel on its own yet.
You haven't read the full thread, have you? On a reply [1], the same author says those things, and other that were failing, can be compiled now.
[1] http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-October/011744.html
Edited 2010-10-26 21:35 UTC
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-October/011744.html
"VDSO compiles with Clang."
"The boot subsystem can be built with Clang."
Fair enough. But 'the late 80's and early 90's' was 20 years ago, now (I know, it's shocking to me too). That is a lot of time to grow beyond meager beginnings.
Furthermore, the Linux kernel prides itself on portability almost as much as NetBSD (which is eclipsed in actual portability by Linux). Given that there are other free C compilers out there (icc, pcc, etc), you would think that Linux would have parted would GCC dependency a long time ago. Compiler dependent code strikes me as just as poor form as architecture dependent code.
The post notes that neither VDSO or the boot code build correctly with clang. The poster modified the build system to compile these two vital components with GCC. So no, clang can't quite build a working Linux kernel on its own yet.
Aside from this, I find it a bit surprising how dependent on GCC the Linux kernel is. I do not think it behooves an open-source operating system to be so compiler-specific. Open source is supposed to be about choice, right? (Among other things)
Aside from this, I find it a bit surprising how dependent on GCC the Linux kernel is. I do not think it behooves an open-source operating system to be so compiler-specific. Open source is supposed to be about choice, right? (Among other things)
Try to code a kernel and you'll find out why it's hard not to become compiler-specific in some way.
ASM, packed attributes... No standard exists for these currently.
Aside from this, I find it a bit surprising how dependent on GCC the Linux kernel is. I do not think it behooves an open-source operating system to be so compiler-specific. Open source is supposed to be about choice, right? (Among other things)
Until recently there was no choice. Before, GCC was the only open source compile worth using (for this purpose). There used to be a ton of good commercial compilers, but most of them have been supplanted by GCC, and it wouldn't be reasonable to expect them to be supported.





Member since:
2007-04-06
The post notes that neither VDSO or the boot code build correctly with clang. The poster modified the build system to compile these two vital components with GCC. So no, clang can't quite build a working Linux kernel on its own yet.
Aside from this, I find it a bit surprising how dependent on GCC the Linux kernel is. I do not think it behooves an open-source operating system to be so compiler-specific. Open source is supposed to be about choice, right? (Among other things)