diff options
author | Zhenzhong Duan <zhenzhong.duan@oracle.com> | 2018-11-02 01:45:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 19:41:19 +0100 |
commit | a9c90037af800bcc74bbdac338355c7f331bd913 (patch) | |
tree | b95118a9b5fd05041bbca209f49de5ba875d6fe9 /scripts | |
parent | 46dfe55fbee9be96f70482f3053b084fad3858d0 (diff) | |
download | linux-stable-a9c90037af800bcc74bbdac338355c7f331bd913.tar.gz linux-stable-a9c90037af800bcc74bbdac338355c7f331bd913.tar.bz2 linux-stable-a9c90037af800bcc74bbdac338355c7f331bd913.zip |
x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support
commit 4cd24de3a0980bf3100c9dcb08ef65ca7c31af48 upstream
Since retpoline capable compilers are widely available, make
CONFIG_RETPOLINE hard depend on the compiler capability.
Break the build when CONFIG_RETPOLINE is enabled and the compiler does not
support it. Emit an error message in that case:
"arch/x86/Makefile:226: *** You are building kernel with non-retpoline
compiler, please update your compiler.. Stop."
[dwmw: Fail the build with non-retpoline compiler]
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Borislav Petkov <bp@suse.de>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: <srinivas.eeda@oracle.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/cca0cb20-f9e2-4094-840b-fb0f8810cd34@default
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7143da06d702..be9e5deb58ba 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -272,10 +272,8 @@ else objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable) endif ifdef CONFIG_RETPOLINE -ifneq ($(RETPOLINE_CFLAGS),) objtool_args += --retpoline endif -endif ifdef CONFIG_MODVERSIONS |