From 714f007d3f97de450bddd0bf0198d2f0b8fdc787 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 c9e88bac5..8ceb015ac 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