summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-22 20:38:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-24 23:43:32 +0000
commite0630bb3dc52539dd979483470016c4b6779a406 (patch)
tree114299e216f9f75300cb3b07ba4c59ea41af2a57 /meta
parentce109ff89c2452bffae86e53d2c2b3e4fa37e73b (diff)
downloadpoky-e0630bb3dc52539dd979483470016c4b6779a406.tar.gz
db: Fix atomic function namespace clash with clang builtins
Rename local function to avoid conflicts with compiler intrinsics (From OE-Core rev: fcfbbae9fdda539665a1e8bfe292f917bd5a1927) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch45
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
new file mode 100644
index 0000000000..571708e03e
--- /dev/null
+++ b/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
@@ -0,0 +1,45 @@
1From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Mar 2017 15:32:26 +0000
4Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash
5 with builtins
6
7Helps building with clang
8
9Fixes
10
11../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange'
12static inline int __atomic_compare_exchange(
13
14Upstream-Status: Pending
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 src/dbinc/atomic.h | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
22index 6a858f7..1b49de5 100644
23--- a/src/dbinc/atomic.h
24+++ b/src/dbinc/atomic.h
25@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
26 #define atomic_inc(env, p) __atomic_inc(p)
27 #define atomic_dec(env, p) __atomic_dec(p)
28 #define atomic_compare_exchange(env, p, o, n) \
29- __atomic_compare_exchange((p), (o), (n))
30+ __db_atomic_compare_exchange((p), (o), (n))
31 static inline int __atomic_inc(db_atomic_t *p)
32 {
33 int temp;
34@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
35 * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
36 * which configure could be changed to use.
37 */
38-static inline int __atomic_compare_exchange(
39+static inline int __db_atomic_compare_exchange(
40 db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
41 {
42 atomic_value_t was;
43--
441.8.3.1
45
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index b7232fc894..26065bbb0b 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -21,6 +21,7 @@ PE = "1"
21SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" 21SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
22SRC_URI += "file://arm-thumb-mutex_db5.patch \ 22SRC_URI += "file://arm-thumb-mutex_db5.patch \
23 file://fix-parallel-build.patch \ 23 file://fix-parallel-build.patch \
24 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
24 " 25 "
25 26
26SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" 27SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"