summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db/db
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/db/db')
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch38
-rw-r--r--meta/recipes-support/db/db/fix-parallel-build.patch19
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 0000000000..40b13dee79
--- /dev/null
+++ b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3--- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
4+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
5@@ -474,6 +474,25 @@
6
7 #ifdef LOAD_ACTUAL_MUTEX_CODE
8 /* gcc/arm: 0 is clear, 1 is set. */
9+#if defined __thumb__
10+#define MUTEX_SET(tsl) ({ \
11+ int __r, __p; \
12+ __asm__ volatile( \
13+ ".align 2\n\t" \
14+ "bx pc\n\t" \
15+ "nop\n\t" \
16+ ".arm\n\t" \
17+ "swpb %0, %2, [%3]\n\t" \
18+ "eor %0, %0, #1\n\t" \
19+ "orr %1, pc, #1\n\t" \
20+ "bx %1\n\t" \
21+ ".force_thumb" \
22+ : "=&r" (__r), "=r" (__p) \
23+ : "r" (1), "r" (tsl) \
24+ ); \
25+ __r & 1; \
26+})
27+#else
28 #define MUTEX_SET(tsl) ({ \
29 int __r; \
30 __asm__ volatile( \
31@@ -484,6 +503,7 @@
32 ); \
33 __r & 1; \
34 })
35+#endif
36
37 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
38 #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/meta/recipes-support/db/db/fix-parallel-build.patch b/meta/recipes-support/db/db/fix-parallel-build.patch
new file mode 100644
index 0000000000..2c7f1e186b
--- /dev/null
+++ b/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -0,0 +1,19 @@
1With higher paralelism it sometimes fails with:
2libtool: link: `util_log.lo' is not a valid libtool object
3make: *** [db_replicate] Error 1
4
5Upstream-Status: Pending
6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8
9--- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
10+++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
11@@ -1034,7 +1034,7 @@
12 db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
13 $(POSTLINK) $@
14
15-db_replicate: db_replicate@o@ util_sig@o@ $(DEF_LIB)
16+db_replicate: db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB)
17 $(CCLINK) -o $@ $(LDFLAGS) \
18 db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
19 $(POSTLINK) $@