aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-11-13 22:43:51 +1100
committerOliver O'Halloran <oohall@gmail.com>2019-11-14 16:10:17 +1100
commitd6fc2fb3afe7ef56415225de2114bd7ccd285d31 (patch)
treed5922506d4f8bf4d8e42354c9c4368792bd3f892 /Makefile.main
parent9e87ef7f745eddf2aed911d60530e84a582ce08a (diff)
downloadskiboot-d6fc2fb3afe7ef56415225de2114bd7ccd285d31.zip
skiboot-d6fc2fb3afe7ef56415225de2114bd7ccd285d31.tar.gz
skiboot-d6fc2fb3afe7ef56415225de2114bd7ccd285d31.tar.bz2
makefiles: Make attribute suggestions non-errors
Different versions of GCC don't have different ideas about when the suggestion should be made. That, combined with -Werror being enabled results in spurious compilation failures for dumb reasons. They're also really annoying when tinkering. They do however make good suggestions on occasion so leave them enabled with -Wno-error enabled so they don't cause compile failures. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 2d60bbb..4d7ebce 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -42,7 +42,9 @@ HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-std=gnu11)
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-m64)
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=const) \
- $(call try-cflag,$(HOSTCC),-Wsuggest-attribute=noreturn)
+ $(call try-cflag,$(HOSTCC),-Wsuggest-attribute=noreturn) \
+ $(call try-cflag,$(HOSTCC),-Wno-error=suggest-attribute=const) \
+ $(call try-cflag,$(HOSTCC),-Wno-error=suggest-attribute=noreturn)
HOSTCFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
# We want small stack usage for skiboot
@@ -126,6 +128,8 @@ endif
CFLAGS += $(call try-cflag,$(CC),-Wjump-misses-init) \
$(call try-cflag,$(CC),-Wsuggest-attribute=const) \
$(call try-cflag,$(CC),-Wsuggest-attribute=noreturn) \
+ $(call try-cflag,$(CC),-Wno-error=suggest-attribute=const) \
+ $(call try-cflag,$(CC),-Wno-error=suggest-attribute=noreturn) \
$(call try-cflag,$(CC),-Wstack-usage=1024) \
$(call try-cflag,$(CC),-Wno-error=address-of-packed-member)