Re: jump_label: move 'asm goto' support test to Kconfig

From: Masahiro Yamada
Date: Wed Jan 02 2019 - 19:36:35 EST

On Wed, Jan 2, 2019 at 9:14 PM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
> Hi,
> I was not aware that CONFIG_JUMP_LABEL Kconfig setting depends on the
> support of asm-goto.
> Currently, I am doing experiments with clang-7 and a snapshot of
> clang-8 on Linux/x86.
> These compilers have no asm-goto support.
> What is your recommendation for Linux >= v4.20?
> I am asking as it is possible to set CONFIG_JUMP_LABEL=y when
> compiling with clang - which has no effect.
> This is confusing.
> Thanks, this patch makes things clearer and protects users from
> setting "wrong" in the sense of non-functional settings.
> I have tested this against recent Linus tree where kbuild/kconfig Git
> pulls were latest commits.
> Tested-by: Sedat Dilek <sedat.dilek@xxxxxxxxx> [ x86 with LLVM/Clang
> v7 and v8 (snapshot) ]

Which part was tested?

x86 kernel cannot be compiled with Clang
since it lacks the asm-goto support.

$ make CC=clang
Compiler lacks asm-goto support.
arch/x86/Makefile:293: recipe for target 'checkbin' failed
make: *** [checkbin] Error 1

Best Regards
Masahiro Yamada