mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-17 05:05:14 +03:00
39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
Patch-Source: https://github.com/chimera-linux/cports/blob/0b7b1b1/contrib/firefox/patches/sqlite-ppc.patch
|
|
From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
|
|
From: Daniel Kolesa <daniel@octaforge.org>
|
|
Date: Fri, 23 Sep 2022 02:38:29 +0200
|
|
Subject: [PATCH] fix sqlite3 on ppc with clang
|
|
|
|
The __ppc__ macro is always defined on clang but not gcc, which
|
|
results in sqlite mistakenly thinking that ppc64le with clang
|
|
is big endian.
|
|
|
|
Also disable some inline assembly stuff on ppc that is never used
|
|
with gcc and probably was never tested with modern machines.
|
|
|
|
rebased 2024-01-24 by @ptrcnull:
|
|
upstream removed the __ppc__ check,
|
|
adding a __LITTLE_ENDIAN__ check to match what they do
|
|
---
|
|
third_party/sqlite3/src/sqlite3.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/third_party/sqlite3/src/sqlite3.c b/third_party/sqlite3/src/sqlite3.c
|
|
index 9443127..8593d8a 100644
|
|
--- a/third_party/sqlite3/src/sqlite3.c
|
|
+++ b/third_party/sqlite3/src/sqlite3.c
|
|
@@ -14874,2 +14874,4 @@ typedef INT16_TYPE LogEst;
|
|
# define SQLITE_BYTEORDER 4321
|
|
+# elif defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1
|
|
+# define SQLITE_BYTEORDER 1234
|
|
# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|
|
@@ -36340,3 +36342,3 @@ SQLITE_PRIVATE int sqlite3VListNameToNum(VList *pIn, const char *zName, int nNam
|
|
|
|
-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
|
|
+#elif 0
|
|
|
|
@@ -207002,2 +207004,4 @@ struct RtreeMatchArg {
|
|
# define SQLITE_BYTEORDER 4321
|
|
+# elif defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1
|
|
+# define SQLITE_BYTEORDER 1234
|
|
# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|