summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch50
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb18
2 files changed, 3 insertions, 65 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
deleted file mode 100644
index 6a8eada605..0000000000
--- a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17:
2
3db: fix thumb uclibc operation in 4.3.29
4 - uclibc thumb builds were using libpthread to implement mutexes, the
5 - uclibc version seems to be a stub (at least on thumb). This commit
6 - fixes the ARM/gcc-assembly mutex implementation so that it has thumb
7 - support and the resultant db4 works (tested on LE Thumb uclibc)
8
9Upstream-Status: Inappropriate [embedded specific]
10
11Author: jbowler@nslu2-linux.org
12
13Index: db-6.0.30/src/dbinc/mutex_int.h
14===================================================================
15--- db-6.0.30.orig/src/dbinc/mutex_int.h
16+++ db-6.0.30/src/dbinc/mutex_int.h
17@@ -474,6 +474,25 @@ typedef unsigned char tsl_t;
18
19 #ifdef LOAD_ACTUAL_MUTEX_CODE
20 /* gcc/arm: 0 is clear, 1 is set. */
21+#if defined __thumb__
22+#define MUTEX_SET(tsl) ({ \
23+ int __r, __p; \
24+ __asm__ volatile( \
25+ ".align 2\n\t" \
26+ "bx pc\n\t" \
27+ "nop\n\t" \
28+ ".arm\n\t" \
29+ "swpb %0, %2, [%3]\n\t" \
30+ "eor %0, %0, #1\n\t" \
31+ "orr %1, pc, #1\n\t" \
32+ "bx %1\n\t" \
33+ ".force_thumb" \
34+ : "=&r" (__r), "=r" (__p) \
35+ : "r" (1), "r" (tsl) \
36+ ); \
37+ __r & 1; \
38+})
39+#else
40 #define MUTEX_SET(tsl) ({ \
41 int __r; \
42 __asm__ volatile( \
43@@ -484,6 +503,7 @@ typedef unsigned char tsl_t;
44 ); \
45 __r & 1; \
46 })
47+#endif
48
49 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
50 #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 093ee44909..b7ed2c798c 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -21,8 +21,7 @@ PR = "r1"
21PE = "1" 21PE = "1"
22 22
23SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" 23SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
24SRC_URI += "file://arm-thumb-mutex_db5.patch \ 24SRC_URI += "file://fix-parallel-build.patch \
25 file://fix-parallel-build.patch \
26 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ 25 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
27 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ 26 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
28 file://sequence-type.patch \ 27 file://sequence-type.patch \
@@ -47,7 +46,6 @@ inherit lib_package
47PACKAGES =+ "${PN}-cxx" 46PACKAGES =+ "${PN}-cxx"
48FILES_${PN}-cxx = "${libdir}/*cxx*so" 47FILES_${PN}-cxx = "${libdir}/*cxx*so"
49 48
50
51# The dev package has the .so link (as in db3) and the .a's - 49# The dev package has the .so link (as in db3) and the .a's -
52# it is therefore incompatible (cannot be installed at the 50# it is therefore incompatible (cannot be installed at the
53# same time) as the db3 package 51# same time) as the db3 package
@@ -59,18 +57,8 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
59# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) 57# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
60DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql" 58DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
61 59
62EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot" 60EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true"
63 61
64# Override the MUTEX setting here, the POSIX library is
65# the default - "POSIX/pthreads/library".
66# Don't ignore the nice SWP instruction on the ARM:
67# These enable the ARM assembler mutex code, this won't
68# work with thumb compilation...
69ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
70MUTEX = ""
71MUTEX_arm = "${ARM_MUTEX}"
72MUTEX_armeb = "${ARM_MUTEX}"
73EXTRA_OECONF += "${MUTEX} STRIP=true"
74EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'" 62EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
75 63
76EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java" 64EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"