Skip to content
  • Zhenzhong Duan's avatar
    x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support · 4cd24de3
    Zhenzhong Duan authored
    
    
    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: default avatarPeter Zijlstra <peterz@infradead.org>
    Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@oracle.com>
    Signed-off-by: default avatarThomas 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...
    4cd24de3