From 1361b8a866578c7d886c34d2655695262da165e0 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Thu, 10 May 2018 11:14:16 +0800 Subject: [PATCH] HV: Enable the -O2 option for HV Now the -O0 option is used. In such case the code is not optimized. Signed-off-by: Zhao Yakui Signed-off-by: Zheng Gen Reviewed-by: Jason Chen CJ Acked-by: Anthony Xu Acked-by: Eddie Dong --- hypervisor/Makefile | 2 +- hypervisor/bsp/uefi/efi/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index d2bd682a2..951563467 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -28,7 +28,7 @@ CFLAGS += -fshort-wchar -ffreestanding CFLAGS += -m64 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 CFLAGS += -mno-red-zone CFLAGS += -static -nostdinc -nostdlib -fno-common -CFLAGS += -O0 -D_FORTIFY_SOURCE=2 +CFLAGS += -O2 -D_FORTIFY_SOURCE=2 CFLAGS += -Wformat -Wformat-security ifdef STACK_PROTECTOR diff --git a/hypervisor/bsp/uefi/efi/Makefile b/hypervisor/bsp/uefi/efi/Makefile index 241870325..882cbe3e4 100644 --- a/hypervisor/bsp/uefi/efi/Makefile +++ b/hypervisor/bsp/uefi/efi/Makefile @@ -68,7 +68,7 @@ endif CFLAGS=-I. -I.. -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \ - -Wall -I../fs/ -D$(ARCH) -O0 + -Wall -I../fs/ -D$(ARCH) -O2 CFLAGS += -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387