]> git.pld-linux.org Git - packages/crafty.git/commitdiff
- fix building on x32 master auto/th/crafty-25.2-1
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 27 Mar 2020 21:42:55 +0000 (22:42 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 27 Mar 2020 21:42:55 +0000 (22:42 +0100)
crafty.spec
x32.patch [new file with mode: 0644]

index f1d05a8474171dd386f32b45bbb553b7350b88f5..1647f9d5b2f8cf0234f8b0fad0e6c0a01b3bba7c 100644 (file)
@@ -27,6 +27,7 @@ Patch0:               %{name}-paths.patch
 Patch1:                %{name}-security.patch
 Patch2:                %{name}-portable.patch
 Patch3:                %{name}-spelling.patch
+Patch4:                x32.patch
 URL:           http://www.craftychess.com/
 BuildRequires: libstdc++-devel
 BuildRequires: sed >= 4.0
@@ -54,6 +55,7 @@ często wygrywa z GNU Chess na tym samym sprzęcie.
 %patch1 -p0
 %patch2 -p0
 %patch3 -p0
+%patch4 -p1
 %{__mv} doc/read.me README
 %{__mv} doc/* .
 %{__mv} bitmaps/README.bitmaps .
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..122a43b
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,11 @@
+--- crafty-25.2/tbprobe.c~     2020-03-27 22:38:46.000000000 +0100
++++ crafty-25.2/tbprobe.c      2020-03-27 22:39:45.477080526 +0100
+@@ -107,7 +107,7 @@
+ #define file(s)                 ((s) & 0x07)
+ #define board(s)                ((uint64_t)1 << (s))
+ static inline unsigned _lsb(uint64_t b) {
+-#ifdef __x86_64__
++#if defined(__x86_64__) && !defined(__ILP32__)
+   size_t idx;
+ __asm__("bsfq %1, %0": "=r"(idx):"rm"(b));
+   return idx;
This page took 0.059618 seconds and 4 git commands to generate.