[packages/lzham] - added x32 patch (rely on _LP64 instead of __x86_64__ when detecting 64-bit pointers)
qboosh
qboosh at pld-linux.org
Sun Mar 29 12:10:38 CEST 2020
commit e49b4178f82f77bb8fbc92f66a4bd5bbef0f9f99
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 29 12:10:28 2020 +0200
- added x32 patch (rely on _LP64 instead of __x86_64__ when detecting 64-bit pointers)
lzham-x32.patch | 12 ++++++++++++
lzham.spec | 2 ++
2 files changed, 14 insertions(+)
---
diff --git a/lzham.spec b/lzham.spec
index f0d5bb7..98368ae 100644
--- a/lzham.spec
+++ b/lzham.spec
@@ -10,6 +10,7 @@ Group: Libraries
Source0: https://github.com/richgel999/lzham_codec/archive/v%{tagver}/lzham_codec-%{tagver}.tar.gz
# Source0-md5: 68ec3db42d2263d7e79d0581293f946d
Patch0: %{name}-includedir.patch
+Patch1: %{name}-x32.patch
URL: https://github.com/richgel999/lzham_codec
BuildRequires: cmake >= 2.8
BuildRequires: libstdc++-devel
@@ -42,6 +43,7 @@ Pliki nagłówkowe bibliotek LZHAM.
%prep
%setup -q -n lzham_codec-%{tagver}
%patch0 -p1
+%patch1 -p1
%build
install -d build
diff --git a/lzham-x32.patch b/lzham-x32.patch
new file mode 100644
index 0000000..2f6705e
--- /dev/null
+++ b/lzham-x32.patch
@@ -0,0 +1,12 @@
+Rely just on _LP64/__LP64__ to detect 64-bit ABI of x86_64 (which could also use ILP32)
+--- lzham_codec-1_0_stable1/lzhamdecomp/lzham_core.h.orig 2015-02-08 04:12:39.000000000 +0100
++++ lzham_codec-1_0_stable1/lzhamdecomp/lzham_core.h 2020-03-29 12:03:51.291820348 +0200
+@@ -169,7 +169,7 @@
+ // --- Generic GCC/clang path for x86/x64, clang or GCC, Linux, OSX, FreeBSD or NetBSD, pthreads for threading, GCC built-ins for atomic ops.
+ #define LZHAM_PLATFORM_PC 1
+
+- #if defined(_LP64) || defined(__LP64__) || defined(__x86_64__)
++ #if defined(_LP64) || defined(__LP64__)
+ // 64-bit build assumes pointers are always 64-bit
+ #define LZHAM_PLATFORM_PC_X64 1
+ #define LZHAM_64BIT_POINTERS 1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lzham.git/commitdiff/e49b4178f82f77bb8fbc92f66a4bd5bbef0f9f99
More information about the pld-cvs-commit
mailing list