summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-09-26 12:27:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-09-26 12:27:17 -0700
commit8b07f74c23a0890977a5ae3c0b2c105d7ac3b584 (patch)
tree60c0be54d2a1274a2e101c7dd6f139c099f88e66
parentf26a24662cd2875f82029e28879a20cea212214c (diff)
parente2ffa15b9baa447e444d654ffd47123ba6443ae4 (diff)
Merge tag 'core-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core fix from Ingo Molnar: "Fix a CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y bug on older Clang versions" * tag 'core-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang < 17
-rw-r--r--init/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index e3eb63eadc87..ecddb94db8dc 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -99,7 +99,10 @@ config GCC_ASM_GOTO_OUTPUT_BROKEN
config CC_HAS_ASM_GOTO_OUTPUT
def_bool y
depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
+ # Detect basic support
depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
+ # Detect clang (< v17) scoped label issues
+ depends on $(success,echo 'void b(void **);void* c(void);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 3;}}' | $(CC) -x c - -c -o /dev/null)
config CC_HAS_ASM_GOTO_TIED_OUTPUT
depends on CC_HAS_ASM_GOTO_OUTPUT