Skip to content

Commit 534bd70

Browse files
alexandrebellonimasahir0y
authored andcommitted
init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash
When using dash as /bin/sh, the CC_HAS_ASM_GOTO_TIED_OUTPUT test fails with a syntax error which is not the one we are looking for: <stdin>: In function ‘foo’: <stdin>:1:29: warning: missing terminating " character <stdin>:1:29: error: missing terminating " character <stdin>:2:5: error: expected ‘:’ before ‘+’ token <stdin>:2:7: warning: missing terminating " character <stdin>:2:7: error: missing terminating " character <stdin>:2:5: error: expected declaration or statement at end of input Removing '\n' solves this. Fixes: 1aa0e8b ("Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug") Signed-off-by: Alexandre Belloni <[email protected]> Reviewed-by: Sean Christopherson <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent eb70814 commit 534bd70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ config CC_HAS_ASM_GOTO_OUTPUT
8787
config CC_HAS_ASM_GOTO_TIED_OUTPUT
8888
depends on CC_HAS_ASM_GOTO_OUTPUT
8989
# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
90-
def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .\n": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
90+
def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
9191

9292
config TOOLS_SUPPORT_RELR
9393
def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)

0 commit comments

Comments
 (0)