kbuild, LLVMLinux: Add -Werror to cc-option to support clang
authorMark Charlebois <[email protected]>
Fri, 31 Mar 2017 20:38:13 +0000 (22:38 +0200)
committerMasahiro Yamada <[email protected]>
Tue, 11 Apr 2017 19:34:20 +0000 (04:34 +0900)
commitc3f0d0bc5b01ad90c45276952802455750444b4f
tree7f53cbdb854bcedda725c0ea8ff17c0285247ceb
parentc834f0e8a8bb3025aac38e802fca2e686720f544
kbuild, LLVMLinux: Add -Werror to cc-option to support clang

Clang will warn about unknown warnings but will not return false
unless -Werror is set. GCC will return false if an unknown
warning is passed.

Adding -Werror make both compiler behave the same.

[arnd: it turns out we need the same patch for testing whether -ffunction-sections
       works right with gcc. I've build tested extensively with this patch
       applied, so let's just merge this one now.]

Signed-off-by: Mark Charlebois <[email protected]>
Signed-off-by: Behan Webster <[email protected]>
Reviewed-by: Jan-Simon Möller <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
scripts/Kbuild.include