summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-03-10 22:41:19 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-03-10 22:41:19 -0700
commitf9acf146c21b1433f3c9337dd49d05c0060f825e (patch)
treed8916681c0f7db3cbf341da0c7ecbac6add054cc
parentsys-apps/yarn: Bump to version 1.22.4 (diff)
downloadgentoo-f9acf146c21b1433f3c9337dd49d05c0060f825e.tar.gz
gentoo-f9acf146c21b1433f3c9337dd49d05c0060f825e.tar.bz2
gentoo-f9acf146c21b1433f3c9337dd49d05c0060f825e.zip
net-misc/memcached: fix -fno-common
Upstream merged our prior patch for -fno-common/gcc10, but also introduced a new regression -fno-common in the latest release. Fixes: https://bugs.gentoo.org/711982 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--net-misc/memcached/files/memcached-1.6.0-gcc10.patch34
-rw-r--r--net-misc/memcached/memcached-1.6.0.ebuild2
2 files changed, 35 insertions, 1 deletions
diff --git a/net-misc/memcached/files/memcached-1.6.0-gcc10.patch b/net-misc/memcached/files/memcached-1.6.0-gcc10.patch
new file mode 100644
index 000000000000..d250b31e9129
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.6.0-gcc10.patch
@@ -0,0 +1,34 @@
+Subject: [PATCH] crc32c: fix multiple definitions
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Reported-By: Toralf Förster <toralf@gentoo.org>
+Bug: https://bugs.gentoo.org/711982
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude '*~' --exclude config.log --exclude autom4te.cache memcached-1.6.0.orig/crc32c.c memcached-1.6.0/crc32c.c
+--- memcached-1.6.0.orig/crc32c.c 2019-10-21 01:48:04.000000000 -0700
++++ memcached-1.6.0/crc32c.c 2020-03-10 22:19:07.610247164 -0700
+@@ -390,6 +390,7 @@
+ #endif
+ /* Compute a CRC-32C. If the crc32 instruction is available, use the hardware
+ version. Otherwise, use the software version. */
++crc_func crc32c;
+ void crc32c_init(void) {
+ #if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__)
+ int sse42;
+diff -Nuar --exclude '*~' --exclude config.log --exclude autom4te.cache memcached-1.6.0.orig/crc32c.h memcached-1.6.0/crc32c.h
+--- memcached-1.6.0.orig/crc32c.h 2019-10-21 01:48:04.000000000 -0700
++++ memcached-1.6.0/crc32c.h 2020-03-10 22:17:12.086974212 -0700
+@@ -2,7 +2,7 @@
+ #define CRC32C_H
+
+ typedef uint32_t (*crc_func)(uint32_t crc, const void *buf, size_t len);
+-crc_func crc32c;
++extern crc_func crc32c;
+
+ void crc32c_init(void);
+
diff --git a/net-misc/memcached/memcached-1.6.0.ebuild b/net-misc/memcached/memcached-1.6.0.ebuild
index 1cce9361ede5..ed887ee56b22 100644
--- a/net-misc/memcached/memcached-1.6.0.ebuild
+++ b/net-misc/memcached/memcached-1.6.0.ebuild
@@ -35,7 +35,7 @@ PATCHES=(
"${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch"
"${FILESDIR}/${PN}-1.4.4-as-needed.patch"
"${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch"
- #"${FILESDIR}/${PN}-1.5.21-hash-fix-build-failure-against-gcc-10.patch"
+ "${FILESDIR}/${PN}-1.6.0-gcc10.patch"
)
src_prepare() {