PROBLEM: 5.11.0-rc7 fails to compile with error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible

From: Stuart Little
Date: Sun Feb 07 2021 - 18:32:10 EST


I am trying to compile on an x86_64 host for a 32-bit system; my config is at

https://termbin.com/v8jl

I am getting numerous errors of the form

./include/linux/kasan-checks.h:17:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible

and

./include/linux/kcsan-checks.h:143:6: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible

and

./arch/x86/include/asm/arch_hweight.h:16:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible

(those include files indicated whom I should add to this list; apologies if this reaches you in error).

The full log of the build is at

https://termbin.com/wbgs

---

5.11.0-rc6 built fine last week on this same setup.