Re: [PATCH] RFC: fs to be compiled with -Dlinux

From: Linus Walleij
Date: Fri Oct 28 2011 - 09:50:10 EST

On Fri, Oct 28, 2011 at 3:05 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> So you need to add it to some CFLAGS at your own build infrastructure,
> not in fs/Makefile.

Sure, fixing. I don't have much of an infrastructure, mainly using a
simple makefile so it's a simple thing to fix up.

> That said, we *probably* should also look at making anything that the
> kernel build uses replace something like
>  #ifdef linux  (or __linux__)
> with
>  #if defined(linux) || defined(__KERNEL__)
> so that we can always rely on just the normal __KERNEL__ define rather
> than depending on the compiler being properly set up for
> cross-compiling for Linux.

Something like this?