Re: [PATCH] RFC: fs to be compiled with -Dlinux
From: Linus Torvalds
Date: Fri Oct 28 2011 - 09:06:04 EST
On Fri, Oct 28, 2011 at 3:15 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> I dunno how to solve this problem the real way or if I'm just doing
> something idiotic. I'm using a vanilla GCC "arm-none-eabi-gcc" not
> targeted at any specific OS so the environment variable "linux" is
> not set.
You need to fix that in general.
It's not just "-Dlinux", it's "-D__linux__" too, and it's not just in fs/.
So you need to add it to some CFLAGS at your own build infrastructure,
not in fs/Makefile.
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.
But your patch is definitely wrong.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/