-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib/fossil: apply sqlite ppc patch
- Loading branch information
1 parent
9289b47
commit 1d68452
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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. | ||
|
||
--- a/extsrc/sqlite3.c | ||
+++ b/extsrc/sqlite3.c | ||
@@ -14875,7 +14875,7 @@ | ||
# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ | ||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ | ||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ | ||
- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) | ||
+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(__LITTLE_ENDIAN__) | ||
# define SQLITE_BYTEORDER 1234 | ||
# elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) | ||
# define SQLITE_BYTEORDER 4321 | ||
@@ -35670,7 +35670,7 @@ SQLITE_PRIVATE int sqlite3VListNameToNum(VList *pIn, const char *zName, int nNam | ||
return (sqlite_uint64)hi << 32 | lo; | ||
} | ||
|
||
-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__)) | ||
+#elif 0 | ||
|
||
__inline__ sqlite_uint64 sqlite3Hwtime(void){ | ||
unsigned long long retval; | ||
@@ -207003,7 +207003,7 @@ | ||
# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ | ||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ | ||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ | ||
- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) | ||
+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(__LITTLE_ENDIAN__) | ||
# define SQLITE_BYTEORDER 1234 | ||
# elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) | ||
# define SQLITE_BYTEORDER 4321 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters