Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2020 02:17:44 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366056 - head/lib/libsqlite3
Message-ID:  <202009230217.08N2HiDi097558@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Wed Sep 23 02:17:44 2020
New Revision: 366056
URL: https://svnweb.freebsd.org/changeset/base/366056

Log:
  [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.

Modified:
  head/lib/libsqlite3/Makefile

Modified: head/lib/libsqlite3/Makefile
==============================================================================
--- head/lib/libsqlite3/Makefile	Wed Sep 23 02:11:24 2020	(r366055)
+++ head/lib/libsqlite3/Makefile	Wed Sep 23 02:17:44 2020	(r366056)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009230217.08N2HiDi097558>