summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-22 10:20:50 -0400
committerTom Rini <trini@konsulko.com>2018-04-27 14:54:48 -0400
commit4760fe26c72563d284cd620421dc8196006ce5e3 (patch)
tree1be616b5d0b52fdbac08b900a434114ec6f2c47d /Makefile
parentd024236e5a31a2b4b82cbcc98b31b8170fc88d28 (diff)
downloadu-boot-4760fe26c72563d284cd620421dc8196006ce5e3.tar.gz
Makefile: Update clang warning disables from Linux
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 <trini@konsulko.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 64351eb769..143644c987 100644
--- a/Makefile
+++ b/Makefile
@@ -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)