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

Joel Stanley joel at jms.id.au
Fri May 4 12:10:28 AEST 2018


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 at 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 --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:
-- 
2.17.0



More information about the Skiboot mailing list