[patch V2a 2/6] kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang < version 17

Peter Zijlstra peterz at infradead.org
Mon Sep 29 03:08:52 PDT 2025


On Mon, Sep 29, 2025 at 11:38:17AM +0200, Geert Uytterhoeven wrote:

> > +       # Detect buggy clang, fixed in clang-17
> > +       depends on $(success,echo 'void b(void **);void* c();int f(void){{asm goto("jmp %l0"::::l0);return 0;l0:return 1;}void *x __attribute__((cleanup(b))) = c();{asm goto("jmp %l0"::::l1);return 2;l1:return 1;}}' | $(CC) -x c - -c -o /dev/null)
> 
> This is supposed to affect only clang builds, right?  I am using
> gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04) to build for
> arm32/arm64/riscv, and thus have:
> 
>     CONFIG_CC_IS_GCC=y
> 
> Still, this commit causes
> 
>     CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
>     CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
> 
> to disappear from my configs? Is that expected?

Not expected -- that means your GCC is somehow failing that test case.
Ideally some GCC person will investigate why this is so.



More information about the linux-arm-kernel mailing list