Linked by Thom Holwerda on Tue 26th Oct 2010 20:36 UTC, submitted by tyrione
Linux Clang can build a kernel now. "The kernel can successfully boot to runlevel 5 (aka X + networking) on the Macbook, both on bare metal and in Qemu. The kernel can successfully boot to runlevel 3 on a secondary test machine, a microATX desktop box (Intel Atom). I haven't tried to start X on this box yet. The kernel can self-host; I am currently running a 'fourth generation' self-hosted Linux kernel built by a 'fourth generation' Clang."
Permalink for comment 447285
To read all comments associated with this story, please click here.
RE: Not quite.
by Neolander on Wed 27th Oct 2010 05:10 UTC in reply to "Not quite."
Member since:

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)

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.

Reply Parent Score: 4