aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-08-08 19:27:24 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-08-08 19:27:24 -0400
commit5c7ebe0522867d6b39a2ac3c166dfb2269710012 (patch)
tree7ee2e58990b2144d6ab0a56477bf23fc24138691
parent7d8a032dd4159e95c337d3d9faa616657ba0ae62 (diff)
parentefe20512212b0e85b5f884b1bfc8fbba2b43541a (diff)
downloadlinux-yocto-v5.15/standard/ti-sdk-5.10/ti-j72xx.tar.gz
linux-yocto-v5.15/standard/ti-sdk-5.10/ti-j72xx.tar.bz2
linux-yocto-v5.15/standard/ti-sdk-5.10/ti-j72xx.zip
Merge branch 'v5.15/standard/base' into v5.15/standard/ti-sdk-5.10/ti-j72xxv5.15/standard/ti-sdk-5.10/ti-j72xx
-rw-r--r--init/Kconfig6
-rwxr-xr-xscripts/gcc-goto.sh31
2 files changed, 34 insertions, 3 deletions
diff --git a/init/Kconfig b/init/Kconfig
index d19ed66aba3b..b6e6b0ad743a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -71,16 +71,16 @@ config CC_CAN_LINK_STATIC
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static)
config CC_HAS_ASM_GOTO
- def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
+ def_bool $(success,$(srctree)/scripts/gcc-goto.sh goto $(CC))
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)
+ def_bool $(success,$(srctree)/scripts/gcc-goto.sh goto_output $(CC))
config CC_HAS_ASM_GOTO_TIED_OUTPUT
depends on CC_HAS_ASM_GOTO_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)
+ def_bool $(success,$(srctree)/scripts/gcc-goto.sh goto_tied_output $(CC))
config TOOLS_SUPPORT_RELR
def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
index 8b980fb2270a..aa9498b74df8 100755
--- a/scripts/gcc-goto.sh
+++ b/scripts/gcc-goto.sh
@@ -3,6 +3,11 @@
# Test for gcc 'asm goto' support
# Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
+TEST=$1
+shift
+
+case $TEST in
+ "goto")
cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null
int main(void)
{
@@ -20,3 +25,29 @@ entry:
return 0;
}
END
+ ;;
+
+ "goto_output")
+cat << "END" | $@ -x c - -c -o /dev/null
+int foo(int x) {
+ asm goto ("": "=r"(x) ::: bar);
+ return x;
+ bar: return 0;
+}
+END
+ ;;
+
+ "goto_tied_output")
+cat << "END" | $@ -x c - -c -o /dev/null
+int foo(int *x) {
+ asm goto (".long (%l[bar]) - .\n": "+m"(*x) ::: bar);
+ return *x;
+ bar: return 0;
+}
+END
+ ;;
+
+ *)
+ exit -1
+ ;;
+esac