OLD | NEW |
(Empty) | |
| 1 From 0233385c56d2b900b6f709a1af07d399285445a2 Mon Sep 17 00:00:00 2001 |
| 2 From: Scott Hess <shess@chromium.org> |
| 3 Date: Tue, 14 Mar 2017 13:51:07 -0700 |
| 4 Subject: [PATCH 10/10] [build] Undefined symbol in intrinsic on clang. |
| 5 |
| 6 SQLite implements sqlite3MulInt64() using __builtin_mul_overflow() for |
| 7 appropriate versions of GCC or clang. But the Chromium clang package |
| 8 doesn't seem to provide the necessary library for Android or Linux i386. |
| 9 |
| 10 BUG=701524 |
| 11 --- |
| 12 third_party/sqlite/src/src/util.c | 8 +++++++- |
| 13 1 file changed, 7 insertions(+), 1 deletion(-) |
| 14 |
| 15 diff --git a/third_party/sqlite/src/src/util.c b/third_party/sqlite/src/src/util
.c |
| 16 index c6d2bae3a7b4..0a76ddec683d 100644 |
| 17 --- a/third_party/sqlite/src/src/util.c |
| 18 +++ b/third_party/sqlite/src/src/util.c |
| 19 @@ -1310,7 +1310,13 @@ int sqlite3SubInt64(i64 *pA, i64 iB){ |
| 20 #endif |
| 21 } |
| 22 int sqlite3MulInt64(i64 *pA, i64 iB){ |
| 23 -#if GCC_VERSION>=5004000 || CLANG_VERSION>=4000000 |
| 24 +/* TODO(shess): Chromium Android clang generates a link error: |
| 25 +** undefined reference to '__mulodi4' |
| 26 +** UPDATE(shess): Also, apparently, 32-bit Linux clang. |
| 27 +*/ |
| 28 +#if GCC_VERSION>=5004000 || \ |
| 29 + (CLANG_VERSION>=4000000 && !defined(__ANDROID__) && \ |
| 30 + (!defined(__linux__) || !defined(__i386__))) |
| 31 return __builtin_mul_overflow(*pA, iB, pA); |
| 32 #else |
| 33 i64 iA = *pA; |
| 34 -- |
| 35 2.11.0 |
| 36 |
OLD | NEW |