diff mbox series

[v2,03/11] Makefile: Disable warnings to make clang happy

Message ID 20180504021036.17027-4-joel@jms.id.au
State Accepted
Headers show
Series Support building with clang | expand

Commit Message

Joel Stanley May 4, 2018, 2:10 a.m. UTC
Clang doesn't like some of the warnings we have, so silence the ones we
know about in order to enable the build to succeed. These should be
investigated and removed in once the code issues are resolved.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
v2: Make stack frame max size larger, as clang-7 is even worse than 6
---
 Makefile.main | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/Makefile.main b/Makefile.main
index 05222a1acc62..8cd5e2d1ed4d 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -163,6 +163,17 @@  CFLAGS += -mcpu=pwr8
 LDFLAGS += -mcpu=pwr8
 ASFLAGS += -mcpu=pwr8
 
+# Workarounds
+# TODO: Fix the issues these hide, and remove them
+CFLAGS += -Wno-cast-align \
+	-Wno-unused-command-line-argument \
+	-Wno-unknown-warning-option \
+	-Wno-gnu-variable-sized-type-not-at-end \
+	-Wno-address-of-packed-member
+
+# pci_add_device_nodes is the largest, at 2048 with clang-7 (smaller with older
+# versions)
+CFLAGS += -Wframe-larger-than=2048
 endif
 
 # Special tool flags: