From 7d8cd911e1e84c9401b60af1b9f99daedc371bec Mon Sep 17 00:00:00 2001 From: Tianhua Sun Date: Fri, 14 Dec 2018 17:02:47 +0800 Subject: [PATCH] security: remove gcc flags Wformat Wformat-security in HV We have used the option --ffreestanding to assert hypervisor is a freestanding environment, and hypervisor does not include standard library. "-Wformat/-Wformat-security" Check calls to the standard library functions printf and scanf, etc., to make sure that the arguments supplied have types appropriate to the format string specified, and that the conversions specified in the format string make sense. these flags disabled by -ffreestanding or -fno-builtin. Tracked-On: #1122 Signed-off-by: Tianhua Sun Reviewed-by: Yin Fengwei Acked-by: Anthony Xu --- hypervisor/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 31498ff0f..5f34fe617 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -51,7 +51,7 @@ CFLAGS += -fsigned-char CFLAGS += -m64 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 CFLAGS += -mno-red-zone CFLAGS += -nostdinc -nostdlib -fno-common -CFLAGS += -Wformat -Wformat-security -Werror +CFLAGS += -Werror ifeq (y, $(CONFIG_RELOC)) CFLAGS += -fpie else