[Skiboot] [PATCH 01/36] Skip -std=gnu11 for sparse

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 15:17:55 AEDT 2015


Some versions of sparse (all?) don't support -std=gnu11 CFLAG, so filter
it out when calling sparse. Doesn't affect non-sparse build

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 Makefile.main  | 1 +
 Makefile.rules | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.main b/Makefile.main
index a5eb01eec949..ccfba6c8bd5b 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -119,6 +119,7 @@ endif
 
 CHECK		= sparse
 CHECKFLAGS     := $(CF)
+CHECK_CFLAGS_SKIP = -std=gnu11
 
 .SECONDARY:
 
diff --git a/Makefile.rules b/Makefile.rules
index 3534f5df4887..ea524886298c 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -35,9 +35,9 @@ endef
 
 ifeq ($(C),1)
   ifeq ($(VERBOSE),1)
-	cmd_check = $(CHECK) $(CHECKFLAGS) $(call cook_cflags,$@) $<
+	cmd_check = $(CHECK) $(CHECKFLAGS) $(filter-out $(CHECK_CFLAGS_SKIP),$(call cook_cflags,$@)) $<
   else
-	cmd_check = @$(CHECK) $(CHECKFLAGS) $(call cook_cflags,$@) $<
+	cmd_check = @$(CHECK) $(CHECKFLAGS) $(filter-out $(CHECK_CFLAGS_SKIP),$(call cook_cflags,$@)) $<
   endif
 endif
 
-- 
2.1.4



More information about the Skiboot mailing list