[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>
pull/13/head
Michael Brown 2013-04-28 16:43:32 +01:00
parent 2e54c4b52e
commit e5cbfefdf3
1 changed files with 1 additions and 0 deletions

View File

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