X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=scripts%2Fgcc-goto.sh;h=a2af2e88daf3e094bc786f368ce4fe88d5b947d7;hb=08956f1c5883f66c2e547f8137061c6b58ccbb53;hp=98cffcb941ea6e319fd4bee04db7f06de379031b;hpb=7676ebbaf21c3828e6315baadb6fcde448aa79b4;p=karo-tx-linux.git diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh index 98cffcb941ea..a2af2e88daf3 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) +{ +#ifdef __arm__ + /* + * 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