Skip to content

Commit

Permalink
Makefile: Update clang warning disables from Linux
Browse files Browse the repository at this point in the history
Re-sync the logic about which clang warnings to disable from v4.17-rc1.
Note that we don't disable all of the same ones as for now we haven't
run into any cases of warnings from clang in code from upstream Linux.

Signed-off-by: Tom Rini <[email protected]>
  • Loading branch information
trini committed Apr 27, 2018
1 parent d024236 commit 4760fe2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ endif
endif

KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral)
ifeq ($(cc-name),clang)
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
endif

# turn jbsr into jsr for m68k
ifeq ($(ARCH),m68k)
Expand Down

0 comments on commit 4760fe2

Please sign in to comment.