X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=scripts%2Fgcc-goto.sh;h=c9469d34ecc62115ff7db422561d38c8e2814bb0;hb=446a42c9b20fe9549c51817f73c1572680ae0a5f;hp=98cffcb941ea6e319fd4bee04db7f06de379031b;hpb=279b1e0fd90ef63c7acb34a5ca573f065a6fefb4;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh index 98cffcb941ea..c9469d34ecc6 100644 --- a/scripts/gcc-goto.sh +++ b/scripts/gcc-goto.sh @@ -2,4 +2,20 @@ # Test for gcc 'asm goto' support # Copyright (C) 2010, Jason Baron -echo "int main(void) { entry: asm goto (\"\"::::entry); return 0; }" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" +cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" +int main(void) +{ +#if defined(__arm__) || defined(__aarch64__) + /* + * Not related to asm goto, but used by jump label + * and broken on some ARM GCC versions (see GCC Bug 48637). + */ + static struct { int dummy; int state; } tp; + asm (".long %c0" :: "i" (&tp.state)); +#endif + +entry: + asm goto ("" :::: entry); + return 0; +} +END