mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
Kconfig: add config option for asm goto w/ outputs
commit 587f17018a upstream.
This allows C code to make use of compilers with support for output
variables along the fallthrough path via preprocessor define:
CONFIG_CC_HAS_ASM_GOTO_OUTPUT
[ This is not used anywhere yet, and currently released compilers don't
support this yet, but it's coming, and I have some local experimental
patches to take advantage of it when it does - Linus ]
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ac21b24af
commit
4946cfd1c8
@@ -38,6 +38,10 @@ config CC_HAS_ASM_GOTO_TIED_OUTPUT
|
||||
# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
|
||||
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)
|
||||
|
||||
config CC_HAS_ASM_GOTO_OUTPUT
|
||||
depends on CC_HAS_ASM_GOTO
|
||||
def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
|
||||
|
||||
config TOOLS_SUPPORT_RELR
|
||||
def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user