]> git.pld-linux.org Git - packages/geos.git/commitdiff
- added x32 patch (adjust x86-specific implementation for ILP32 x86_64 target); release 2 auto/th/geos-3.8.1-2
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 8 Nov 2020 21:06:29 +0000 (22:06 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 8 Nov 2020 21:06:29 +0000 (22:06 +0100)
geos-x32.patch [new file with mode: 0644]
geos.spec

diff --git a/geos-x32.patch b/geos-x32.patch
new file mode 100644 (file)
index 0000000..596371f
--- /dev/null
@@ -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)
index 9ed0aa3a4cec334d2f6b124cf79c626f304bcdc9..aae2a85ac6af95973c8a856d50687ef4918c621e 100644 (file)
--- 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
This page took 0.140591 seconds and 4 git commands to generate.