summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-04-25 12:27:14 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-04-25 12:29:37 +0100
commit58bfbf51627caf280e9b644e5df8f4f0f35ffd54 (patch)
tree6d810cc6690bb197b67ce397b261882092250b7f /sys-process/criu
parentnet-analyzer/rrdtool: Skip msync test that relies on host behaviour (diff)
downloadgentoo-58bfbf51627caf280e9b644e5df8f4f0f35ffd54.tar.gz
gentoo-58bfbf51627caf280e9b644e5df8f4f0f35ffd54.tar.bz2
gentoo-58bfbf51627caf280e9b644e5df8f4f0f35ffd54.zip
sys-process/criu: tweak for gcc-10, bug #707942
Closes: https://bugs.gentoo.org/707942 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-process/criu')
-rw-r--r--sys-process/criu/criu-3.12.ebuild3
-rw-r--r--sys-process/criu/files/criu-3.12-gcc-10.patch76
2 files changed, 78 insertions, 1 deletions
diff --git a/sys-process/criu/criu-3.12.ebuild b/sys-process/criu/criu-3.12.ebuild
index 9321be89fc07..7b5158f5f9b0 100644
--- a/sys-process/criu/criu-3.12.ebuild
+++ b/sys-process/criu/criu-3.12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}"/2.2/${PN}-2.2-flags.patch
"${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
"${FILESDIR}"/${PN}-3.12-automagic-libbsd.patch
+ "${FILESDIR}"/${PN}-3.12-gcc-10.patch # backport
)
criu_arch() {
diff --git a/sys-process/criu/files/criu-3.12-gcc-10.patch b/sys-process/criu/files/criu-3.12-gcc-10.patch
new file mode 100644
index 000000000000..ff277b5b22df
--- /dev/null
+++ b/sys-process/criu/files/criu-3.12-gcc-10.patch
@@ -0,0 +1,76 @@
+https://bugs.gentoo.org/707942
+
+From 10d9dcdb6e2fbe4646ff3f27cd35376ebaeeb0f9 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 2 Feb 2020 18:45:59 +0000
+Subject: [PATCH] criu: fix build failure against gcc-10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+ld: criu/arch/x86/crtools.o:criu/include/cr_options.h:159:
+ multiple definition of `rpc_cfg_file'; criu/arch/x86/cpu.o:criu/include/cr_options.h:159: first defined here
+make[2]: *** [scripts/nmk/scripts/build.mk:164: criu/arch/x86/crtools.built-in.o] Error 1
+```
+
+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
+Bug: https://bugs.gentoo.org/707942
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ criu/config.c | 1 +
+ criu/include/cr_options.h | 2 +-
+ criu/include/pstree.h | 2 +-
+ criu/include/tun.h | 2 +-
+ 4 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/criu/config.c
++++ b/criu/config.c
+@@ -30,6 +30,7 @@
+ #include "common/xmalloc.h"
+
+ struct cr_options opts;
++char *rpc_cfg_file;
+
+ static int count_elements(char **to_count)
+ {
+--- a/criu/include/cr_options.h
++++ b/criu/include/cr_options.h
+@@ -156,7 +156,7 @@ struct cr_options {
+ };
+
+ extern struct cr_options opts;
+-char *rpc_cfg_file;
++extern char *rpc_cfg_file;
+
+ extern int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd, int state);
+ extern int check_options(void);
+--- a/criu/include/pstree.h
++++ b/criu/include/pstree.h
+@@ -42,7 +42,7 @@ enum {
+ };
+ #define FDS_EVENT (1 << FDS_EVENT_BIT)
+
+-struct pstree_item *current;
++extern struct pstree_item *current;
+
+ struct rst_info;
+ /* See alloc_pstree_item() for details */
+--- a/criu/include/tun.h
++++ b/criu/include/tun.h
+@@ -5,7 +5,7 @@
+ #define TUN_MINOR 200
+ #endif
+
+-struct ns_id *ns;
++extern struct ns_id *ns;
+
+ #include <linux/netlink.h>
+