summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/criu/criu_git.bb8
-rw-r--r--recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch102
-rw-r--r--recipes-containers/criu/files/0001-criu-fix-build-failure-against-gcc-10.patch87
3 files changed, 3 insertions, 194 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 24aa3012..febf81ed 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -13,15 +13,13 @@ EXCLUDE_FROM_WORLD = "1"
13 13
14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" 14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
15 15
16SRCREV = "c703e3fd8404e506cc6156719b953ea0580d59a4" 16SRCREV = "e49ce513c8df43e8d3b30b7acfbe7bd496d89862"
17PV = "3.13+git${SRCPV}" 17PV = "3.14+git${SRCPV}"
18 18
19SRC_URI = "git://github.com/checkpoint-restore/criu.git \ 19SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=criu-dev \
20 file://0001-criu-Fix-toolchain-hardcode.patch \
21 file://0002-criu-Skip-documentation-install.patch \ 20 file://0002-criu-Skip-documentation-install.patch \
22 file://0001-criu-Change-libraries-install-directory.patch \ 21 file://0001-criu-Change-libraries-install-directory.patch \
23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ 22 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
24 file://0001-criu-fix-build-failure-against-gcc-10.patch \
25 " 23 "
26 24
27COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 25COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
diff --git a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch b/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
deleted file mode 100644
index bd7a6c57..00000000
--- a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1From c005b7a4874f55df687ff22bc425551775581421 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Fri, 8 Sep 2017 15:02:14 -0400
4Subject: [PATCH] criu: Fix toolchain hardcode
5
6Replace ":=" to "?=" so that the toolchain used by bitbake build system will
7be taken.
8
9Signed-off-by: Yang Shi <yang.shi@windriver.com>
10Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
11Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
12
13---
14 Makefile | 2 +-
15 scripts/nmk/scripts/include.mk | 2 +-
16 scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
17 3 files changed, 22 insertions(+), 22 deletions(-)
18
19diff --git a/Makefile b/Makefile
20index f2583a2..d7f51e5 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
24 HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
25 endif
26
27-UNAME-M := $(shell uname -m)
28+UNAME-M ?= $(shell uname -m)
29
30 #
31 # Supported Architectures
32diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
33index 04ccb3a..0d63bc7 100644
34--- a/scripts/nmk/scripts/include.mk
35+++ b/scripts/nmk/scripts/include.mk
36@@ -22,7 +22,7 @@ SUBARCH := $(shell uname -m | sed \
37 -e s/aarch64.*/aarch64/)
38
39 ARCH ?= $(SUBARCH)
40-SRCARCH := $(ARCH)
41+SRCARCH ?= $(ARCH)
42
43 export SUBARCH ARCH SRCARCH
44
45diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
46index 56dba84..1698821 100644
47--- a/scripts/nmk/scripts/tools.mk
48+++ b/scripts/nmk/scripts/tools.mk
49@@ -2,35 +2,35 @@ ifndef ____nmk_defined__tools
50
51 #
52 # System tools shorthands
53-RM := rm -f
54+RM ?= rm -f
55 HOSTLD ?= ld
56 ifeq ($(origin LD), default)
57 LD := $(CROSS_COMPILE)$(HOSTLD)
58 endif
59 HOSTCC ?= gcc
60 ifeq ($(origin CC), default)
61 CC := $(CROSS_COMPILE)$(HOSTCC)
62 endif
63-CPP := $(CC) -E
64-AS := $(CROSS_COMPILE)as
65-AR := $(CROSS_COMPILE)ar
66-STRIP := $(CROSS_COMPILE)strip
67-OBJCOPY := $(CROSS_COMPILE)objcopy
68-OBJDUMP := $(CROSS_COMPILE)objdump
69-NM := $(CROSS_COMPILE)nm
70-MAKE := make
71-MKDIR := mkdir -p
72-AWK := awk
73-PERL := perl
74-FULL_PYTHON := $(shell which python2 2>/dev/null || which python3 2>/dev/null)
75+CPP ?= $(CC) -E
76+AS ?= $(CROSS_COMPILE)as
77+AR ?= $(CROSS_COMPILE)ar
78+STRIP ?= $(CROSS_COMPILE)strip
79+OBJCOPY ?= $(CROSS_COMPILE)objcopy
80+OBJDUMP ?= $(CROSS_COMPILE)objdump
81+NM ?= $(CROSS_COMPILE)nm
82+MAKE ?= make
83+MKDIR ?= mkdir -p
84+AWK ?= awk
85+PERL ?= perl
86+FULL_PYTHON ?= $(shell which python2 2>/dev/null || which python3 2>/dev/null)
87 PYTHON ?= $(shell basename $(FULL_PYTHON))
88-FIND := find
89-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
90+FIND ?= find
91+SH ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
92 else if [ -x /bin/bash ]; then echo /bin/bash; \
93 else echo sh; fi ; fi)
94-CSCOPE := cscope
95-ETAGS := etags
96-CTAGS := ctags
97+CSCOPE ?= cscope
98+ETAGS ?= etags
99+CTAGS ?= ctags
100
101 export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
102 export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
diff --git a/recipes-containers/criu/files/0001-criu-fix-build-failure-against-gcc-10.patch b/recipes-containers/criu/files/0001-criu-fix-build-failure-against-gcc-10.patch
deleted file mode 100644
index f1a2561f..00000000
--- a/recipes-containers/criu/files/0001-criu-fix-build-failure-against-gcc-10.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From c6b9c083ecbd2060c7dc77a9264ef10aafa19063 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyfox@gentoo.org>
3Date: Sun, 2 Feb 2020 18:45:59 +0000
4Subject: [PATCH] criu: fix build failure against gcc-10
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9On gcc-10 (and gcc-9 -fno-common) build fails as:
10
11```
12ld: criu/arch/x86/crtools.o:criu/include/cr_options.h:159:
13 multiple definition of `rpc_cfg_file'; criu/arch/x86/cpu.o:criu/include/cr_options.h:159: first defined here
14make[2]: *** [scripts/nmk/scripts/build.mk:164: criu/arch/x86/crtools.built-in.o] Error 1
15```
16
17gcc-10 will change the default from -fcommon to fno-common:
18https://gcc.gnu.org/PR85678.
19
20The error also happens if CFLAGS=-fno-common passed explicitly.
21
22Reported-by: Toralf Förster
23Bug: https://bugs.gentoo.org/707942
24Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
25
26Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/pull/936]
27
28Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
29
30---
31 criu/config.c | 1 +
32 criu/include/cr_options.h | 2 +-
33 criu/include/pstree.h | 2 +-
34 criu/include/tun.h | 2 +-
35 4 files changed, 4 insertions(+), 3 deletions(-)
36
37diff --git a/criu/config.c b/criu/config.c
38index 39aa071c..009a48a6 100644
39--- a/criu/config.c
40+++ b/criu/config.c
41@@ -30,6 +30,7 @@
42 #include "common/xmalloc.h"
43
44 struct cr_options opts;
45+char *rpc_cfg_file;
46
47 static int count_elements(char **to_count)
48 {
49diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
50index 82f76ad9..9c20aaea 100644
51--- a/criu/include/cr_options.h
52+++ b/criu/include/cr_options.h
53@@ -147,7 +147,7 @@ struct cr_options {
54 };
55
56 extern struct cr_options opts;
57-char *rpc_cfg_file;
58+extern char *rpc_cfg_file;
59
60 extern int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd, int state);
61 extern int check_options();
62diff --git a/criu/include/pstree.h b/criu/include/pstree.h
63index 7303c1fe..61ab0ce0 100644
64--- a/criu/include/pstree.h
65+++ b/criu/include/pstree.h
66@@ -42,7 +42,7 @@ enum {
67 };
68 #define FDS_EVENT (1 << FDS_EVENT_BIT)
69
70-struct pstree_item *current;
71+extern struct pstree_item *current;
72
73 struct rst_info;
74 /* See alloc_pstree_item() for details */
75diff --git a/criu/include/tun.h b/criu/include/tun.h
76index ce0b266a..b82c445a 100644
77--- a/criu/include/tun.h
78+++ b/criu/include/tun.h
79@@ -5,7 +5,7 @@
80 #define TUN_MINOR 200
81 #endif
82
83-struct ns_id *ns;
84+extern struct ns_id *ns;
85
86 #include <linux/netlink.h>
87