1 |
commit: f9acf146c21b1433f3c9337dd49d05c0060f825e |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 11 05:41:19 2020 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 11 05:41:19 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9acf146 |
7 |
|
8 |
net-misc/memcached: fix -fno-common |
9 |
|
10 |
Upstream merged our prior patch for -fno-common/gcc10, but also |
11 |
introduced a new regression -fno-common in the latest release. |
12 |
|
13 |
Fixes: https://bugs.gentoo.org/711982 |
14 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
15 |
|
16 |
.../memcached/files/memcached-1.6.0-gcc10.patch | 34 ++++++++++++++++++++++ |
17 |
net-misc/memcached/memcached-1.6.0.ebuild | 2 +- |
18 |
2 files changed, 35 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/net-misc/memcached/files/memcached-1.6.0-gcc10.patch b/net-misc/memcached/files/memcached-1.6.0-gcc10.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..d250b31e912 |
23 |
--- /dev/null |
24 |
+++ b/net-misc/memcached/files/memcached-1.6.0-gcc10.patch |
25 |
@@ -0,0 +1,34 @@ |
26 |
+Subject: [PATCH] crc32c: fix multiple definitions |
27 |
+ |
28 |
+gcc-10 will change the default from -fcommon to fno-common: |
29 |
+https://gcc.gnu.org/PR85678. |
30 |
+ |
31 |
+The error also happens if CFLAGS=-fno-common passed explicitly. |
32 |
+ |
33 |
+Reported-By: Toralf Förster <toralf@g.o> |
34 |
+Bug: https://bugs.gentoo.org/711982 |
35 |
+Signed-off-by: Robin H. Johnson <robbat2@g.o> |
36 |
+ |
37 |
+diff -Nuar --exclude '*~' --exclude config.log --exclude autom4te.cache memcached-1.6.0.orig/crc32c.c memcached-1.6.0/crc32c.c |
38 |
+--- memcached-1.6.0.orig/crc32c.c 2019-10-21 01:48:04.000000000 -0700 |
39 |
++++ memcached-1.6.0/crc32c.c 2020-03-10 22:19:07.610247164 -0700 |
40 |
+@@ -390,6 +390,7 @@ |
41 |
+ #endif |
42 |
+ /* Compute a CRC-32C. If the crc32 instruction is available, use the hardware |
43 |
+ version. Otherwise, use the software version. */ |
44 |
++crc_func crc32c; |
45 |
+ void crc32c_init(void) { |
46 |
+ #if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__) |
47 |
+ int sse42; |
48 |
+diff -Nuar --exclude '*~' --exclude config.log --exclude autom4te.cache memcached-1.6.0.orig/crc32c.h memcached-1.6.0/crc32c.h |
49 |
+--- memcached-1.6.0.orig/crc32c.h 2019-10-21 01:48:04.000000000 -0700 |
50 |
++++ memcached-1.6.0/crc32c.h 2020-03-10 22:17:12.086974212 -0700 |
51 |
+@@ -2,7 +2,7 @@ |
52 |
+ #define CRC32C_H |
53 |
+ |
54 |
+ typedef uint32_t (*crc_func)(uint32_t crc, const void *buf, size_t len); |
55 |
+-crc_func crc32c; |
56 |
++extern crc_func crc32c; |
57 |
+ |
58 |
+ void crc32c_init(void); |
59 |
+ |
60 |
|
61 |
diff --git a/net-misc/memcached/memcached-1.6.0.ebuild b/net-misc/memcached/memcached-1.6.0.ebuild |
62 |
index 1cce9361ede..ed887ee56b2 100644 |
63 |
--- a/net-misc/memcached/memcached-1.6.0.ebuild |
64 |
+++ b/net-misc/memcached/memcached-1.6.0.ebuild |
65 |
@@ -35,7 +35,7 @@ PATCHES=( |
66 |
"${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" |
67 |
"${FILESDIR}/${PN}-1.4.4-as-needed.patch" |
68 |
"${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch" |
69 |
- #"${FILESDIR}/${PN}-1.5.21-hash-fix-build-failure-against-gcc-10.patch" |
70 |
+ "${FILESDIR}/${PN}-1.6.0-gcc10.patch" |
71 |
) |
72 |
|
73 |
src_prepare() { |