summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/db/db_4.3.29.bb4
-rw-r--r--packages/db/files/.mtn2git_empty0
-rw-r--r--packages/db/files/arm-thumb-mutex.patch36
3 files changed, 38 insertions, 2 deletions
diff --git a/packages/db/db_4.3.29.bb b/packages/db/db_4.3.29.bb
index ba11e12901..31b0b91367 100644
--- a/packages/db/db_4.3.29.bb
+++ b/packages/db/db_4.3.29.bb
@@ -14,10 +14,11 @@ HOMEPAGE = "http://www.sleepycat.com"
LICENSE = "BSD Sleepycat"
VIRTUAL_NAME ?= "virtual/db"
CONFLICTS = "db3"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz"
#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
+SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
inherit autotools
@@ -60,7 +61,6 @@ EXTRA_OECONF = "${DB4_CONFIG}"
# These enable the ARM assembler mutex code, this won't
# work with thumb compilation...
ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-ARM_MUTEX_thumb = ""
MUTEX = ""
MUTEX_arm = "${ARM_MUTEX}"
MUTEX_armeb = "${ARM_MUTEX}"
diff --git a/packages/db/files/.mtn2git_empty b/packages/db/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/db/files/.mtn2git_empty
diff --git a/packages/db/files/arm-thumb-mutex.patch b/packages/db/files/arm-thumb-mutex.patch
new file mode 100644
index 0000000000..acd446fcd8
--- /dev/null
+++ b/packages/db/files/arm-thumb-mutex.patch
@@ -0,0 +1,36 @@
+--- db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:33:27.761042518 -0800
++++ db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:55:24.823920060 -0800
+@@ -470,6 +470,25 @@
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+ #define MUTEX_SET_TEST 1 /* gcc/arm: 0 is clear, 1 is set. */
+
++#if defined __thumb__
++#define MUTEX_SET(tsl) ({ \
++ int __r, __p; \
++ asm volatile( \
++ ".align 2\n\t" \
++ "bx pc\n\t" \
++ "nop\n\t" \
++ ".arm\n\t" \
++ "swpb %0, %2, [%3]\n\t" \
++ "eor %0, %0, #1\n\t" \
++ "orr %1, pc, #1\n\t" \
++ "bx %1\n\t" \
++ ".force_thumb" \
++ : "=&r" (__r), "=r" (__p) \
++ : "r" (1), "r" (tsl) \
++ ); \
++ __r & 1; \
++})
++#else
+ #define MUTEX_SET(tsl) ({ \
+ int __r; \
+ asm volatile( \
+@@ -480,6 +499,7 @@
+ ); \
+ __r & 1; \
+ })
++#endif
+
+ #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
+ #define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)