Re: Linux kernel support -O0 optimization flag?

From: richard -rw- weinberger
Date: Mon Apr 15 2013 - 07:16:42 EST


On Mon, Apr 15, 2013 at 9:58 AM, Ley Foon Tan <lftan@xxxxxxxxxx> wrote:
>
>
> Change KBUILD_CFLAGS to -O0 in Makefile and got the compilation error as
> below.
> Is the Linux kernel support -O0 optimization flag?

No. If I'm not mistaken we need this to make sure that the compiler
inlines some functions.

In your case the compiler failed to compute the BUILD_BUG() macro correctly.
It depends also on optimization.

--
Thanks,
//richard
--
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/