Re: Linux kernel support -O0 optimization flag?

From: Pavel Machek
Date: Wed Apr 24 2013 - 04:29:50 EST

On Mon 2013-04-15 13:16:36, richard -rw- weinberger wrote:
> 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.

Actually... You probably could replace BUILD_BUG() with nop. Bugs are
not expected to happen, right? you'll probably hit something else...

(cesky, pictures)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at