aboutsummaryrefslogtreecommitdiff
path: root/lib/libsqlite3
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2020-09-23 02:17:44 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2020-09-23 02:17:44 +0000
commitbceb5a2c8d8118a88da93a2240e856999de53a93 (patch)
tree97ac69a20525e8249fa1ca73a564d3a8d936bb95 /lib/libsqlite3
parentf4eb39ba6bc914e380edb6088041d0deb3fe1b13 (diff)
downloadsrc-bceb5a2c8d8118a88da93a2240e856999de53a93.tar.gz
src-bceb5a2c8d8118a88da93a2240e856999de53a93.zip
[PowerPC64LE] Pass our byte order to the sqlite3 build.
Due to the sqlite3 endian detection code preferring to check platform defines instead of checking endian defines, it is necessary to manually set the endianness on PowerPC64LE. Unlike other bi-endian platforms, PowerPC64LE relies entirely on the generic endianness macros like __BYTE_ORDER__ and has no platform-specific define to denote little endian. Add -DSQLITE_BYTEORDER=1234 to the CFLAGS when building libsqlite3 on powerpc64le. Fixes runtime operation of sqlite on PowerPC64LE. Sponsored by: Tag1 Consulting, Inc.
Notes
Notes: svn path=/head/; revision=366056
Diffstat (limited to 'lib/libsqlite3')
-rw-r--r--lib/libsqlite3/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libsqlite3/Makefile b/lib/libsqlite3/Makefile
index 458e7d7ddfb1..8694876dbc10 100644
--- a/lib/libsqlite3/Makefile
+++ b/lib/libsqlite3/Makefile
@@ -35,4 +35,8 @@ CFLAGS+= -I${SQLITE} \
-D_REENTRANT=1 \
-DSQLITE_THREADSAFE=1
+.if ${MACHINE_ARCH} == "powerpc64le"
+CFLAGS+= -DSQLITE_BYTEORDER=1234
+.endif
+
.include <bsd.lib.mk>