[Skiboot] [PATCH] Makefile: Separate CFLAGS and HOSTCFLAGS warning flags

Samuel Mendoza-Jonas sam.mj at au1.ibm.com
Wed Aug 5 17:40:43 AEST 2015


Some warnings may not be supported in older host compilers - remove them
from HOSTCFLAGS but keep them for CFLAGS

Removed from HOSTCFLAGS:
	-Wjump-misses-init
	-Wsuggest-attribute=const
	-Wsuggest-attribute=noreturn
	-Wstack-usage=1024

Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
 Makefile.main | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile.main b/Makefile.main
index 48d8b8d..2d929b6 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -26,10 +26,20 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 	  -Wframe-larger-than=1024 -Wstack-usage=1024 \
 	  -Werror -Wno-error=format
 
+# Host base warnings
+HOSTCWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+	  -Werror-implicit-function-declaration -Wdeclaration-after-statement \
+	  -Wno-pointer-sign -Wextra -Wno-sign-compare \
+	  -Wmissing-prototypes -Wmissing-declarations \
+	  -Wwrite-strings -Wcast-align \
+	  -Winit-self \
+	  -Wframe-larger-than=1024 \
+	  -Werror -Wno-error=format
+
 # Host tools and options
 HOSTCC=gcc
 HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e 's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/')
-HOSTCFLAGS=-O1 $(CWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
+HOSTCFLAGS=-O1 $(HOSTCWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
 VALGRIND=valgrind -q --show-reachable=yes --error-exitcode=99
 
 # Target options
-- 
2.5.0



More information about the Skiboot mailing list