summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db/db
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/db/db
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/db/db')
-rw-r--r--meta/recipes-support/db/db/sequence-type.patch59
1 files changed, 59 insertions, 0 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"