[build] Use -Wno-decl when running sparse

Linker table entries must be non-static in order to avoid being
completely optimised away by some versions of gcc.  Use -Wno-decl to
prevent sparse from warning about these, since the alternative would
be to litter the code with otherwise unnecessary "extern"
declarations.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-04-28 16:43:32 +01:00
parent 2e54c4b52e
commit e5cbfefdf3

View File

@@ -207,6 +207,7 @@ endif
ifeq ($(C),1)
export REAL_CC := $(CC)
CC := cgcc
CFLAGS += -Wno-decl
endif
###############################################################################