From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Linux Kernel contains only C code?
Date: Mon, 29 Jan 2018 18:33:45 +0100 [thread overview]
Message-ID: <20180129173345.GA21978@kroah.com> (raw)
In-Reply-To: <CAH8yC8kAooATTO93v+rk54ooXS1t3j9HUQRQ3SRg9JY6dUPHZA@mail.gmail.com>
On Mon, Jan 29, 2018 at 12:16:19PM -0500, Jeffrey Walton wrote:
> On Mon, Jan 29, 2018 at 10:41 AM, Augusto Mecking Caringi
> <augustocaringi@gmail.com> wrote:
> > On Fri, Jan 26, 2018 at 2:12 PM, <valdis.kletnieks@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.
>
> Yeah, the kernel has too much undefined behavior and implementation
> defined behavior to build with other compilers at the moment.
What other compilers do you suggest we use?
Clang works great with the kernel, a few million phones are shipping
with kernels built with it. icc has worked with the kernel for over a
decade now, for anyone still stuck using that beast.
What else is there?
> It would be nice if they moved away from UB and implementation defined
> behvior, but sometimes the political problems are heavier than the
> technical solutions.
What do you mean by this? What "UB" does the kernel rely on that
prevents compilers from properly building it? We do have some pretty
strict requirements in the kernel for a compiler, but anything "odd" is
usually just a bug and we are always willing to take patches to fix
them.
thanks,
greg k-h
next prev parent reply other threads:[~2018-01-29 17:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 6:58 Linux Kernel contains only C code? inventsekar
2018-01-26 7:16 ` Alice Ferrazzi
2018-01-26 7:19 ` valdis.kletnieks at vt.edu
2018-01-26 7:20 ` Larry Chen
2018-01-26 10:53 ` Ruben Safir
2018-01-26 13:12 ` valdis.kletnieks at vt.edu
2018-01-29 15:41 ` Augusto Mecking Caringi
2018-01-29 17:16 ` Jeffrey Walton
2018-01-29 17:33 ` Greg KH [this message]
2018-01-29 18:00 ` Jeffrey Walton
2018-01-29 19:59 ` Greg KH
2018-02-01 16:37 ` Aruna Hewapathirane
2018-02-01 16:49 ` Augusto Mecking Caringi
2018-02-01 17:32 ` Greg KH
2018-02-02 6:52 ` valdis.kletnieks at vt.edu
2018-02-02 10:11 ` Daniel.
2018-02-02 10:27 ` Augusto Mecking Caringi
2018-02-02 19:05 ` Daniel.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180129173345.GA21978@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.