Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: third_party/sqlite/patches/0010-build-Undefined-symbol-in-intrinsic-on-clang.patch

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698