Linux Kernel contains only C code?

Augusto Mecking Caringi augustocaringi at gmail.com
Mon Jan 29 10:41:48 EST 2018


On Fri, Jan 26, 2018 at 2:12 PM,  <valdis.kletnieks at vt.edu> wrote:
> On Fri, 26 Jan 2018 05:53:20 -0500, Ruben Safir said:
>> Its not even really C, at least not as a normal application developer
>> thinks of it.  This is systems programming with a lot of kernel specific
>> libraries.
>
> It's C.  The fact that things like stdio aren't available inside the kernel
> doesn't mean it's not C.

I would say that is C with GNU extensions [1]... Not plain/pure (ANSI/ISO) C.

That's why it's not so easy to build the Linux Kernel with any other C compiler.

There is a ongoing effort to build it with Clang [2].

I'm not sure how is the current status regarding the Intel C Compiler.

> (I've worked on large userspace code bases where you could go for several
> hundred thousand lines without seeing anything from /usr/include, and nobody
> would argue that code wasn't C.)

Best regards,

[1] https://www.ibm.com/developerworks/linux/library/l-gcc-hacks/
[2] https://lwn.net/Articles/734071/

-- 
Augusto Mecking Caringi



More information about the Kernelnewbies mailing list