summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-11-01 13:52:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:57 +0000
commit1002359e5e5cd191911ea90d5d820f995a4199be (patch)
treee34135f2625f97395ed4af2890b24c1a6dbfbb77 /meta/recipes-support
parent3eca58ca70cc9ba31f89408e832325dfec4288f2 (diff)
downloadpoky-1002359e5e5cd191911ea90d5d820f995a4199be.tar.gz
db: change types to avoid headers changing between architectures
Triggered by looking at why Python doesn't find db.h (because it greps db.h for a regex, and db.h is actually a oe_multilib_header wrapper) I realised that the only reason we have to oe_multilib_header db.h is because one typedef is different between 32-bit and 64-bit architectures. However, the typedef is for a 64-bit integer so instead of using long (64-bit) or long long (32-bit), just use int64_t. Some of the overly complicated configure tests need to be deleted after this change but that is safe as we're building in a controlled environment and can assume int64_t exists. With this done the header doesn't change between architectures, and it doesn't need to be wrapped by oe_multilib_header. (From OE-Core rev: 6c9ffa50d00a55122ed861e1818186035fd89715) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/db/db/sequence-type.patch59
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb5
2 files changed, 61 insertions, 3 deletions
diff --git a/meta/recipes-support/db/db/sequence-type.patch b/meta/recipes-support/db/db/sequence-type.patch
new file mode 100644
index 0000000000..a6fe3d62a0
--- /dev/null
+++ b/meta/recipes-support/db/db/sequence-type.patch
@@ -0,0 +1,59 @@
1configure wants to use host-specific types to get a 64-bit integer in db.h
2instead of using an alias such as int64_t. This means that the header differs
3in multilib environments for no good reason, so replace the type with the alias
4in stdint.h.
5
6This then breaks the overly complicated type check but as we know that int64_t
7exists and works, we can just delete that.
8
9Upstream-Status: Pending
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12--- a/dist/aclocal/sequence.m4~ 2013-09-09 16:35:02.000000000 +0100
13+++ b/dist/aclocal/sequence.m4 2017-11-01 13:21:45.472295971 +0000
14@@ -24 +24 @@
15- db_cv_seq_type="long"
16+ db_cv_seq_type="int64_t"
17@@ -31 +31 @@
18- db_cv_seq_type="long long"
19+ db_cv_seq_type="int64_t"
20@@ -41,38 +41 @@
21- # Test to see if we can declare variables of the appropriate size
22- # and format them. If we're cross-compiling, all we get is a link
23- # test, which won't test for the appropriate printf format strings.
24- if test "$db_cv_build_sequence" = "yes"; then
25- AC_TRY_RUN([
26- main() {
27- $db_cv_seq_type l;
28- unsigned $db_cv_seq_type u;
29- char buf@<:@100@:>@;
30-
31- buf@<:@0@:>@ = 'a';
32- l = 9223372036854775807LL;
33- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
34- if (strcmp(buf, "9223372036854775807"))
35- return (1);
36- u = 18446744073709551615ULL;
37- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
38- if (strcmp(buf, "18446744073709551615"))
39- return (1);
40- return (0);
41- }],, [db_cv_build_sequence="no"],
42- AC_TRY_LINK(,[
43- $db_cv_seq_type l;
44- unsigned $db_cv_seq_type u;
45- char buf@<:@100@:>@;
46-
47- buf@<:@0@:>@ = 'a';
48- l = 9223372036854775807LL;
49- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
50- if (strcmp(buf, "9223372036854775807"))
51- return (1);
52- u = 18446744073709551615ULL;
53- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
54- if (strcmp(buf, "18446744073709551615"))
55- return (1);
56- return (0);
57- ],, [db_cv_build_sequence="no"]))
58- fi
59+ db_cv_build_sequence="yes"
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 66282600f5..fb4befbaf7 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -23,6 +23,7 @@ SRC_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 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
25 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ 25 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
26 file://sequence-type.patch \
26 " 27 "
27# We are not interested in official latest 6.x versions; 28# We are not interested in official latest 6.x versions;
28# let's track what debian is using. 29# let's track what debian is using.
@@ -34,7 +35,7 @@ SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe7247804317
34 35
35LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" 36LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
36 37
37inherit autotools multilib_header 38inherit autotools
38 39
39# Put virtual/db in any appropriate provider of a 40# Put virtual/db in any appropriate provider of a
40# relational database, use it as a dependency in 41# relational database, use it as a dependency in
@@ -112,8 +113,6 @@ do_install_append() {
112 ln -s db51/db.h ${D}/${includedir}/db.h 113 ln -s db51/db.h ${D}/${includedir}/db.h
113 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h 114 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
114 115
115 oe_multilib_header db51/db.h
116
117 # The docs end up in /usr/docs - not right. 116 # The docs end up in /usr/docs - not right.
118 if test -d "${D}/${prefix}/docs" 117 if test -d "${D}/${prefix}/docs"
119 then 118 then