Re: Linux kernel support -O0 optimization flag?

richard -rw- weinberger
2013-04-15T11:16:39Z

On Mon, Apr 15, 2013 at 9:58 AM, Ley Foon Tan <lftan@altera.com> 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