From 2ca01206f3529449b24c077497d0ea2794a8ca26 Mon Sep 17 00:00:00 2001 From: Yin Fengwei Date: Fri, 21 Feb 2020 08:45:33 +0800 Subject: [PATCH] Makefile: fix build issue on old gcc The previous fcf-protection fix broke the old gcc (older than gcc 8 which is common on Ubuntu 18.04 and older distributions). We only add fcf-protection=none for gcc8 and newer. Tracked-On: #4358 Signed-off-by: Yin Fengwei --- hypervisor/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 0da7c5503..25e956369 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -102,7 +102,9 @@ endif # https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961 # # We disable the -fcf-protection in ACRN build. +ifeq (true, $(shell [ $(GCC_MAJOR) -gt 8 ] && echo true)) CFLAGS += -fcf-protection=none +endif ASFLAGS += -m64 -nostdinc -nostdlib