[packages/geos] - added x32 patch (adjust x86-specific implementation for ILP32 x86_64 target); release 2

qboosh qboosh at pld-linux.org
Sun Nov 8 22:06:25 CET 2020


commit 82e55cccb4ec8e5136a6b3a73bec330afb82e7ee
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 8 22:06:29 2020 +0100

    - added x32 patch (adjust x86-specific implementation for ILP32 x86_64 target); release 2

 geos-x32.patch | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 geos.spec      |   4 ++-
 2 files changed, 112 insertions(+), 1 deletion(-)
---
diff --git a/geos.spec b/geos.spec
index 9ed0aa3..aae2a85 100644
--- a/geos.spec
+++ b/geos.spec
@@ -6,12 +6,13 @@ Summary:	Geometry Engine - Open Source
 Summary(pl.UTF-8):	GEOS - silnik geometryczny z otwartymi źródłami
 Name:		geos
 Version:	3.8.1
-Release:	1
+Release:	2
 License:	LGPL v2.1
 Group:		Libraries
 Source0:	http://download.osgeo.org/geos/%{name}-%{version}.tar.bz2
 # Source0-md5:	9d25df02a2c4fcc5a59ac2fb3f0bd977
 Patch0:		rubydir.patch
+Patch1:		%{name}-x32.patch
 URL:		http://trac.osgeo.org/geos/
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake
@@ -92,6 +93,7 @@ Wiązania języka Ruby do biblioteki GEOS.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal} -I macros
diff --git a/geos-x32.patch b/geos-x32.patch
new file mode 100644
index 0000000..596371f
--- /dev/null
+++ b/geos-x32.patch
@@ -0,0 +1,109 @@
+--- geos-3.8.1/include/geos/algorithm/ttmath/ttmathtypes.h.orig	2019-09-18 23:38:19.000000000 +0200
++++ geos-3.8.1/include/geos/algorithm/ttmath/ttmathtypes.h	2020-11-08 20:39:00.133786117 +0100
+@@ -109,7 +109,7 @@
+ */
+ #if !defined TTMATH_PLATFORM32 && !defined TTMATH_PLATFORM64
+ 
+-	#if !defined _M_X64 && !defined __x86_64__
++	#if !defined _M_X64 && !defined __x86_64__ || defined __ILP32__
+ 
+ 		/*
+ 			other platforms than x86 and amd64 are not recognized at the moment
+--- geos-3.8.1/include/geos/algorithm/ttmath/ttmathuint_x86.h.orig	2019-09-18 23:38:19.000000000 +0200
++++ geos-3.8.1/include/geos/algorithm/ttmath/ttmathuint_x86.h	2020-11-08 21:56:34.060500817 +0100
+@@ -524,7 +524,11 @@
+ 		uint dummy1, dummy2, dummy3;
+ 
+ 			__asm__ __volatile__(
++#ifdef __x86_64__
++				"push %%rdx							\n"
++#else
+ 				"push %%edx							\n"
++#endif
+ 				"xor %%edx, %%edx					\n"   // edx = 0, cf = 0
+ 			"1:										\n"
+ 				"mov (%%esi,%%edx,4), %%eax			\n"
+@@ -536,7 +540,11 @@
+ 			"jnz 1b									\n"
+ 
+ 				"adc %%ecx, %%ecx					\n"   // ecx has the cf state
++#ifdef __x86_64__
++				"pop %%rax							\n"   // eax = rest
++#else
+ 				"pop %%eax							\n"   // eax = rest
++#endif
+ 
+ 				"or %%eax, %%eax					\n"
+ 				"jz 3f								\n"
+@@ -857,7 +865,11 @@
+ 		uint dummy1, dummy2, dummy3;
+ 
+ 			__asm__ __volatile__(
++#ifdef __x86_64__
++				"push %%rdx							\n"
++#else
+ 				"push %%edx							\n"
++#endif
+ 				"xor %%edx, %%edx					\n"   // edx = 0, cf = 0
+ 			"1:										\n"
+ 				"mov (%%esi,%%edx,4), %%eax			\n"
+@@ -869,7 +881,11 @@
+ 			"jnz 1b									\n"
+ 
+ 				"adc %%ecx, %%ecx					\n"   // ecx has the cf state
++#ifdef __x86_64__
++				"pop %%rax							\n"   // eax = rest
++#else
+ 				"pop %%eax							\n"   // eax = rest
++#endif
+ 
+ 				"or %%eax, %%eax					\n"
+ 				"jz 3f								\n"
+@@ -1141,7 +1157,11 @@
+ 
+ 		__asm__  __volatile__(
+ 
++#ifdef __x86_64__
++			"push %%rbp						\n"
++#else
+ 			"push %%ebp						\n"
++#endif
+ 			
+ 			"movl %%ecx, %%esi				\n"
+ 			"movl $32, %%ecx				\n"
+@@ -1171,7 +1191,11 @@
+ 			
+ 			"and $1, %%eax					\n"
+ 
++#ifdef __x86_64__
++			"pop %%rbp						\n"
++#else
+ 			"pop %%ebp						\n"
++#endif
+ 
+ 			: "=a" (c), "=D" (dummy), "=S" (dummy2), "=d" (dummy3)
+ 			: "0" (c),  "1" (b), "b" (p1), "c" (bits)
+@@ -1272,7 +1296,11 @@
+ 
+ 			__asm__  __volatile__(
+ 
++#ifdef __x86_64__
++			"push %%rbp						\n"
++#else
+ 			"push %%ebp						\n"
++#endif
+ 			
+ 			"movl %%ecx, %%esi				\n"
+ 			"movl $32, %%ecx				\n"
+@@ -1305,7 +1333,11 @@
+ 			"roll $1, %%eax					\n"
+ 			"andl $1, %%eax					\n"
+ 
++#ifdef __x86_64__
++			"pop %%rbp						\n"
++#else
+ 			"pop %%ebp						\n"
++#endif
+ 
+ 			: "=a" (c), "=D" (dummy), "=S" (dummy2), "=d" (dummy3)
+ 			: "0" (c),  "1" (b), "b" (p1), "c" (bits)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/geos.git/commitdiff/82e55cccb4ec8e5136a6b3a73bec330afb82e7ee



More information about the pld-cvs-commit mailing list