Date
1 - 3 of 3
[PATCH] Makefile: disable fcf-protection for some build env
Yin, Fengwei <fengwei.yin@...>
In some build env (Ubuntu 19.10 as example), gcc enabled the option
-fcf-protection by default. But this option is not comptible with -mindirect-branch. Which could trigger following build error: fail to build with gcc-9 [error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible] -mindirect-branch is mandatory for repoline mitigation and always enabled for ACRN build. We disable -fcf-protection here for ACRN build. Tracked-On: #4358 Signed-off-by: Yin Fengwei <fengwei.yin@...> --- hypervisor/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index e8694eef..0da7c550 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -97,6 +97,13 @@ endif CFLAGS += -DSTACK_PROTECTOR endif +# In case using Ubuntu 19.10 as build environment, its gcc has -fcf-protection enabled +# by default. But this option is not compatible with -mindirect-branch: +# https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961 +# +# We disable the -fcf-protection in ACRN build. +CFLAGS += -fcf-protection=none + ASFLAGS += -m64 -nostdinc -nostdlib LDFLAGS += -Wl,--gc-sections -nostartfiles -nostdlib -- 2.20.1 |
|
Wu, Binbin
toggle quoted message
Show quoted text
-----Original Message-----typo "comptible" Others LGTM. Which could trigger following build error: |
|
Yin, Fengwei <fengwei.yin@...>
On 1/14/2020 1:59 PM, Wu, Binbin wrote:
Thanks. I will PR with this typo fixed.-----Original Message-----typo "comptible" Regards Yin, Fengwei Which could trigger following build error: |
|