From 52a91fff0d4e05b48e1259b4ef01d490baa1bdd6 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Thu, 10 May 2018 11:14:03 +0800 Subject: [PATCH] HV: Use the CFLAGS to control the optimization option Now two flags can be used to control the optimizatin option. So unify them and only one flag can be used to config the optimization 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 | 4 ++-- hypervisor/bsp/uefi/efi/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index c3be78005..ad64608e2 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -28,7 +28,7 @@ CFLAGS += -fshort-wchar -ffreestanding CFLAGS += -m64 CFLAGS += -mno-red-zone CFLAGS += -static -nostdinc -nostdlib -fno-common -CFLAGS += -O2 -D_FORTIFY_SOURCE=2 +CFLAGS += -O0 -D_FORTIFY_SOURCE=2 CFLAGS += -Wformat -Wformat-security ifdef STACK_PROTECTOR @@ -50,7 +50,7 @@ LDFLAGS += -Wl,--gc-sections -static -nostartfiles -nostdlib LDFLAGS += -Wl,-n,-z,max-page-size=0x1000 LDFLAGS += -Wl,-z,noexecstack -ARCH_CFLAGS += -gdwarf-2 -O0 +ARCH_CFLAGS += -gdwarf-2 ARCH_ASFLAGS += -gdwarf-2 -DASSEMBLER=1 ARCH_ARFLAGS += ARCH_LDFLAGS += diff --git a/hypervisor/bsp/uefi/efi/Makefile b/hypervisor/bsp/uefi/efi/Makefile index e65cc89e0..520f01875 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) + -Wall -I../fs/ -D$(ARCH) -O0 ifeq ($(ARCH),ia32) ifeq ($(HOST),x86_64)