diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 6a7efa78eba22082650d89f5408dd1d0657e9479..0a6d497221e49a9ef23b441f6e3fdd71f64c4e7c 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -57,6 +57,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 @@ -127,9 +130,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