0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-06 02:26:34 +00:00
termux-packages/packages/mariadb/i686-no-asm-goto.patch
2024-02-10 23:05:09 +08:00

17 lines
773 B
Diff

```
[...]/src/storage/innobase/include/fil0fil.h:1495:16: error: invalid operand for inline asm constraint 'i'
__asm__ goto("lock btsl $31, %0\t\njnc %l1" : : "m" (n_pending)
^
```
--- a/storage/innobase/sync/srw_lock.cc
+++ b/storage/innobase/sync/srw_lock.cc
@@ -276,7 +276,7 @@
/* Only clang-10 introduced support for asm goto */
#elif defined __APPLE__
/* At least some versions of Apple Xcode do not support asm goto */
-#elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
+#elif defined __GNUC__ && ((defined __i386__ && !defined __ANDROID__) || defined __x86_64__)
# define IF_FETCH_OR_GOTO(mem, bit, label) \
__asm__ goto("lock btsl $" #bit ", %0\n\t" \
"jc %l1" : : "m" (mem) : "cc", "memory" : label);