|
@@ -232,13 +232,9 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
|
|
|
|
|
|
# Avoid indirect branches in kernel to deal with Spectre
|
|
|
ifdef CONFIG_RETPOLINE
|
|
|
- RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
|
|
- RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk
|
|
|
-
|
|
|
- RETPOLINE_CFLAGS += $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
|
|
|
- ifneq ($(RETPOLINE_CFLAGS),)
|
|
|
- KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
|
|
|
- endif
|
|
|
+ifneq ($(RETPOLINE_CFLAGS),)
|
|
|
+ KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
|
|
|
+endif
|
|
|
endif
|
|
|
|
|
|
archscripts: scripts_basic
|