Skip to content

Instantly share code, notes, and snippets.

@neofob
Last active December 20, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neofob/6122629 to your computer and use it in GitHub Desktop.
Save neofob/6122629 to your computer and use it in GitHub Desktop.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment