building kernel

Third-party module build broken with kernel

Summary: Third-party module build is broken with kernel (up-to 3.5 as I tested)
with -g.

Error:

include/linux/rcupdate.h: In function ‘__kfree_rcu’:

include/linux/rcupdate.h:918:2: error: size of unnamed array is negative

Quick fix:

Adding -Os or -O2 to your KBUILD_CFLAGS.

Reference: See LKML thread.