summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-support/sqlite/sqlite3.inc
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-support/sqlite/sqlite3.inc')
-rw-r--r--poky/meta/recipes-support/sqlite/sqlite3.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/poky/meta/recipes-support/sqlite/sqlite3.inc b/poky/meta/recipes-support/sqlite/sqlite3.inc
index 7cf23d044..4af1e09e8 100644
--- a/poky/meta/recipes-support/sqlite/sqlite3.inc
+++ b/poky/meta/recipes-support/sqlite/sqlite3.inc
@@ -19,7 +19,7 @@ UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
CVE_PRODUCT = "sqlite"
-inherit autotools pkgconfig
+inherit autotools pkgconfig siteinfo
# enable those which are enabled by default in configure
PACKAGECONFIG ?= "fts4 fts5 json1 rtree dyn_ext"
@@ -47,10 +47,14 @@ EXTRA_OECONF = " \
CFLAGS_append = " -fPIC"
# pread() is in POSIX.1-2001 so any reasonable system must surely support it
-CFLAGS += "-DUSE_PREAD"
+CFLAGS_append = " -DUSE_PREAD"
# Provide column meta-data API
-CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+CFLAGS_append = " -DSQLITE_ENABLE_COLUMN_METADATA"
+
+# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
+# huristics, which are not always correct
+CFLAGS_append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"