lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: PROBLEM: 5.11.0-rc7 fail s to compile with error: ‘-m indirect-branch’ and ‘-fcf-p rotection’ are not compatible
From
That did fix it, thank you!

On February 8, 2021 7:12:27 AM EST, Borislav Petkov <bp@suse.de> wrote:
>On Sun, Feb 07, 2021 at 07:40:32PM -0500, Stuart Little wrote:
>> > On Sun, Feb 07, 2021 at 06:31:22PM -0500, Stuart Little wrote:
>> > > 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
>
>Does this fix it?
>
>---
>
>diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>index 5857917f83ee..30920d70b48b 100644
>--- a/arch/x86/Makefile
>+++ b/arch/x86/Makefile
>@@ -50,6 +50,9 @@ export BITS
> KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
> KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
>
>+# Intel CET isn't enabled in the kernel
>+KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
>+
> ifeq ($(CONFIG_X86_32),y)
> BITS := 32
> UTS_MACHINE := i386
>@@ -120,9 +123,6 @@ else
>
> KBUILD_CFLAGS += -mno-red-zone
> KBUILD_CFLAGS += -mcmodel=kernel
>-
>- # Intel CET isn't enabled in the kernel
>- KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
> endif
>
> ifdef CONFIG_X86_X32

\
 
 \ /
  Last update: 2021-02-08 18:01    [W:0.095 / U:1.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site