HV: Add gcc compiler option to disable FPU/SSE/MMX

FPU/SSE is not supported in HV. Otherwise it is possible that the
SSE/FPU register is used under -O2 option.
So the gcc option is added to disable them.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zhao Yakui 2018-05-10 11:14:09 +08:00 committed by Jack Ren
parent 52a91fff0d
commit 3a9bf54d66
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ HV_FILE := acrn
CFLAGS += -Wall -W
CFLAGS += -ffunction-sections -fdata-sections
CFLAGS += -fshort-wchar -ffreestanding
CFLAGS += -m64
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

View File

@ -70,6 +70,8 @@ CFLAGS=-I. -I.. -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
-Wall -I../fs/ -D$(ARCH) -O0
CFLAGS += -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387
ifeq ($(ARCH),ia32)
ifeq ($(HOST),x86_64)
CFLAGS += -m32