OSDN Git Service

kbuild, LLVMLinux: Add -Werror to cc-option to support clang
authorMark Charlebois <charlebm@gmail.com>
Fri, 31 Mar 2017 20:38:13 +0000 (22:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:07:57 +0000 (16:07 +0100)
commit045812536e46b13d25f2d252819c20a4a7d2079a
tree42ba7a0c82537540bf5e45e230220692c18df279
parentf96245c042d6e77b0dd3b48e3a0abb4147f92937
kbuild, LLVMLinux: Add -Werror to cc-option to support clang

commit c3f0d0bc5b01ad90c45276952802455750444b4f upstream.

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 <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Adjust context due to lack of d26e94149276f]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/Kbuild.include