Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2018-12-07 11:43:38 +0100
committerJiri Slaby <jslaby@suse.cz>2018-12-07 13:40:46 +0100
commitdb81944eb1d5c28ae93aec8d842c941a908f3e91 (patch)
tree3320df2d34df37d80c6ca8048842759b7752db10
parentf26dedd495599b7993beddb98051e869c5d3c58e (diff)
x86/build: Fix compiler support check for CONFIG_RETPOLINE
(KMP build). suse-commit: fb5fd392fe5943aa5a9b149970e4b448a7465c5c
-rw-r--r--arch/x86/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f5d7f4134524..75ef499a66e2 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -220,9 +220,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# Avoid indirect branches in kernel to deal with Spectre
ifdef CONFIG_RETPOLINE
-ifeq ($(RETPOLINE_CFLAGS),)
- $(error You are building kernel with non-retpoline compiler, please update your compiler.)
-endif
KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
endif
@@ -307,6 +304,13 @@ ifndef CC_HAVE_ASM_GOTO
@echo Compiler lacks asm-goto support.
@exit 1
endif
+ifdef CONFIG_RETPOLINE
+ifeq ($(RETPOLINE_CFLAGS),)
+ @echo "You are building kernel with non-retpoline compiler." >&2
+ @echo "Please update your compiler." >&2
+ @false
+endif
+endif
archclean:
$(Q)rm -rf $(objtree)/arch/i386