Comment 10 for bug 868550

Revision history for this message
Nicolas Pitre (npitre) wrote : Re: [Bug 868550] [GIT PULL] Avoid #ifdef __linux__ misuse in exportable headers

On Fri, 7 Oct 2011, Arnd Bergmann wrote:

> More importantly, it's not at all clear from the description why you are
> even doing this. If the android toolchain does not set __linux__, this
> sounds more like a bug in the android toolchain. I would expect much
> more stuff to break because of that.

Some people claim that this symbol belongs to libc and/or the user space
environment. The fact that we compile the kernel with a hosted compiler
providing that symbol by default doesn't necessarily make it legit in
the kernel.

The kernel source code is self contained. In theory, we should be able
to compile the Linux kernel with a compiler targetting non-Linux bare
metal configurations, and in that case it is expected for the __linux__
symbol to not be defined.