diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-02-28 12:01:09 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-02-28 12:01:09 +0800 |
commit | 6e49b7fa3083c30688b7fff1b37ed891cd1c30af (patch) | |
tree | 3054864f2e58bcd86000567ce99e25753ddc794a /arch/x86/Makefile | |
parent | 2ba51c6d36ee1b43c1f898c6c48ddf3d33e9ab30 (diff) | |
parent | be42cd02846a611af533103a3f4b6a7d8c592f49 (diff) |
Merge remote-tracking branch 'rt-stable/v4.9-rt' into linux-linaro-lsk-v4.9-rtlsk-v4.9-18.03-rt
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r-- | arch/x86/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 2d449337a360..cd22cb8ebd42 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -182,6 +182,14 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y) +# Avoid indirect branches in kernel to deal with Spectre +ifdef CONFIG_RETPOLINE + RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) + ifneq ($(RETPOLINE_CFLAGS),) + KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE + endif +endif + archscripts: scripts_basic $(Q)$(MAKE) $(build)=arch/x86/tools relocs |