Linux kernel support -O0 optimization flag?

Ley Foon Tan
2013-04-15T07:59:12Z

Change KBUILD_CFLAGS to -O0 in Makefile and got the compilation error as
below.
Is the Linux kernel support -O0 optimization flag?
Note, I have tried 2 architecture compilers and got the same error.

In function 'zap_pmd_range',

inlined from 'zap_pud_range' at mm/memory.c:1288:8,

inlined from 'unmap_page_range' at mm/memory.c:1313:8:

mm/memory.c:1243:23: error: call to '__build_bug_failed' declared with
attribute error: BUILD_BUG failed

make[1]: *** [mm/memory.o] Error 1