The easiest fix is to move this check to the "archprepare" like commit
829fe4aa9ac1 ("x86: Allow generating user-space headers without a
compiler") did.
Link: https://lkml.org/lkml/2018/12/4/206
Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")
Reported-by: Meelis Roos <mroos@xxxxxxxx>
Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
---
Changes in v2:
- Revive ifdef CONFIG_RETPOLINE surrounding the KBUILD_CFLAGS addition
- Rephase the commit log a bit, hoping the cause of the issue will be clearer