1 |
commit: 73d30f360cfcfeb20e7a634407310fe04a112336 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 5 21:53:19 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 5 21:53:19 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73d30f36 |
7 |
|
8 |
net-misc/memcached: tweak crc32c build on ia64, bug #718136 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/718136 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
13 |
|
14 |
.../memcached/files/memcached-1.6.5-ia64.patch | 51 ++++++++++++++++++++++ |
15 |
net-misc/memcached/memcached-1.6.5.ebuild | 1 + |
16 |
2 files changed, 52 insertions(+) |
17 |
|
18 |
diff --git a/net-misc/memcached/files/memcached-1.6.5-ia64.patch b/net-misc/memcached/files/memcached-1.6.5-ia64.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..5a73913b92e |
21 |
--- /dev/null |
22 |
+++ b/net-misc/memcached/files/memcached-1.6.5-ia64.patch |
23 |
@@ -0,0 +1,51 @@ |
24 |
+https://github.com/memcached/memcached/commit/73633d31b22068dfda5ef969c08139c083d96d71.patch |
25 |
+ |
26 |
+From 73633d31b22068dfda5ef969c08139c083d96d71 Mon Sep 17 00:00:00 2001 |
27 |
+From: Sergei Trofimovich <slyfox@g.o> |
28 |
+Date: Sun, 19 Apr 2020 10:08:19 +0100 |
29 |
+Subject: [PATCH] crc32c.c: don't attempt to enable hardware crc32 on ia64 |
30 |
+ |
31 |
+Itanium has no hardware crc32 implementation and build fails as: |
32 |
+ |
33 |
+``` |
34 |
+ia64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -pthread \ |
35 |
+ ... -c -o memcached-crc32c.o `test -f 'crc32c.c' || echo './'`crc32c.c |
36 |
+crc32c.c: In function 'crc32c_init': |
37 |
+crc32c.c:385:9: error: unknown register name '%edx' in 'asm' |
38 |
+ 385 | __asm__("cpuid" \ |
39 |
+ | ^~~~~~~ |
40 |
+``` |
41 |
+ |
42 |
+The change removes ia64 from crc32 paths. |
43 |
+ |
44 |
+Bug: https://bugs.gentoo.org/718136 |
45 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
46 |
+--- |
47 |
+ crc32c.c | 5 ++--- |
48 |
+ 1 file changed, 2 insertions(+), 3 deletions(-) |
49 |
+ |
50 |
+--- a/crc32c.c |
51 |
++++ b/crc32c.c |
52 |
+@@ -167,7 +167,7 @@ static uint32_t crc32c_hw_aarch64(uint32_t crc, const void* buf, size_t len) |
53 |
+ #endif |
54 |
+ |
55 |
+ /* Apply if the platform is intel */ |
56 |
+-#if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__) |
57 |
++#if defined(__X86_64__)||defined(__x86_64__) |
58 |
+ |
59 |
+ /* Multiply a matrix times a vector over the Galois field of two elements, |
60 |
+ GF(2). Each element is a bit in an unsigned integer. mat must have at |
61 |
+@@ -388,12 +388,11 @@ static uint32_t crc32c_hw(uint32_t crc, const void *buf, size_t len) |
62 |
+ : "%ebx", "%edx"); \ |
63 |
+ (have) = (ecx >> 20) & 1; \ |
64 |
+ } while (0) |
65 |
+- |
66 |
+ #endif |
67 |
+ /* Compute a CRC-32C. If the crc32 instruction is available, use the hardware |
68 |
+ version. Otherwise, use the software version. */ |
69 |
+ void crc32c_init(void) { |
70 |
+- #if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__) |
71 |
++ #if defined(__X86_64__)||defined(__x86_64__) |
72 |
+ int sse42; |
73 |
+ SSE42(sse42); |
74 |
+ |
75 |
|
76 |
diff --git a/net-misc/memcached/memcached-1.6.5.ebuild b/net-misc/memcached/memcached-1.6.5.ebuild |
77 |
index 75cbb9370f3..206190e3a92 100644 |
78 |
--- a/net-misc/memcached/memcached-1.6.5.ebuild |
79 |
+++ b/net-misc/memcached/memcached-1.6.5.ebuild |
80 |
@@ -35,6 +35,7 @@ PATCHES=( |
81 |
"${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" |
82 |
"${FILESDIR}/${PN}-1.4.4-as-needed.patch" |
83 |
"${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch" |
84 |
+ "${FILESDIR}/${PN}-1.6.5-ia64.patch" |
85 |
) |
86 |
|
87 |
src_prepare() { |