Comment 15 for bug 868550

Revision history for this message
Arnd Bergmann (arnd-arndb) wrote :

Don't you also have to define __linux__ when building the kernel with a freestanding gcc? A few architectures (e.g. mips and score) always set __linux__ from their arch specific Makefile, and I see nothing wrong with that.

Also, we currently have to use android specific patches already when building a kernel for android, so adding yet another patch in there to add -D__linux__ for the andrdoid toolchain sounds reasonable. For the exported header files, let's first see if the unifdef approach works. AFAIU, the real issue here is that you cannot build android user space with the header files exported from a regular kernel, and that should really be possible and not rely on any patches at all.