summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2020-11-06 15:05:19 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-11-09 23:03:58 -0500
commit82bca23d6aa31c9141182f62939b1dc823bf4381 (patch)
tree8d28d83936f871aed752419884985f9f4d7ade7f
parent8e4b1e39a228c28e779f3b1b28347f3b8acfb37e (diff)
downloadmeta-virtualization-82bca23d6aa31c9141182f62939b1dc823bf4381.tar.gz
xvisor: fix build with gcc-10
* with gcc-10 (which doesn't include -fcommon by default) it fails like this: aarch64-oe-linux-ld: error: TOPDIR/BUILD/work/raspberrypi3_64-oe-linux/xvisor/git-r0/git/build/drivers/mmc/core/mmc.o: multiple definition of 'sdio_func_type' aarch64-oe-linux-ld: error: TOPDIR/BUILD/work/raspberrypi3_64-oe-linux/xvisor/git-r0/git/build/drivers/mmc/core/sdio_bus.o: multiple definition of 'sdio_func_type' aarch64-oe-linux-ld: error: TOPDIR/BUILD/work/raspberrypi3_64-oe-linux/xvisor/git-r0/git/build/drivers/mmc/core/sdio_io.o: multiple definition of 'sdio_func_type' aarch64-oe-linux-ld: error: TOPDIR/BUILD/work/raspberrypi3_64-oe-linux/xvisor/git-r0/git/build/drivers/mmc/core/sdio.o: multiple definition of 'sdio_func_type' aarch64-oe-linux-ld: TOPDIR/BUILD/work/raspberrypi3_64-oe-linux/xvisor/git-r0/git/build/drivers/mmc/core/core.o: previous definition here Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch55
-rw-r--r--recipes-extended/xvisor/xvisor_git.bb5
2 files changed, 58 insertions, 2 deletions
diff --git a/recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch b/recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch
new file mode 100644
index 00000000..221a314c
--- /dev/null
+++ b/recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch
@@ -0,0 +1,55 @@
1From 417184cc41cfd33ae7b4c11c8396e0f47f43e2ba Mon Sep 17 00:00:00 2001
2From: Jean-Christophe Dubois <jcd@tribudubois.net>
3Date: Fri, 8 May 2020 15:17:36 +0200
4Subject: [PATCH] EMULATORS: Allow Xvisor to compile with gcc 10.
5
6With gcc 10 because some header files do not declare some variable
7definition as extern, the variable get duplicated in all files
8using it.
9
10This patch allow xvisor to compile with the latest gcc.
11
12Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
13Reviewed-by: Anup Patel <anup@brainfault.org>
14---
15 drivers/mmc/core/core.h | 2 +-
16 emulators/display/drawfn.h | 10 +++++-----
17 2 files changed, 6 insertions(+), 6 deletions(-)
18
19diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
20index d75d135a..e2ca3141 100644
21--- a/drivers/mmc/core/core.h
22+++ b/drivers/mmc/core/core.h
23@@ -64,7 +64,7 @@ int mmc_go_idle(struct mmc_host *host);
24 * Note: Must be called with host->lock held.
25 */
26 extern struct vmm_bus sdio_bus_type;
27-struct vmm_device_type sdio_func_type;
28+extern struct vmm_device_type sdio_func_type;
29
30 int __sdio_attach(struct mmc_host *host);
31
32diff --git a/emulators/display/drawfn.h b/emulators/display/drawfn.h
33index f9163cff..385deaf6 100644
34--- a/emulators/display/drawfn.h
35+++ b/emulators/display/drawfn.h
36@@ -69,14 +69,14 @@ typedef void (*drawfn)(struct vmm_surface *,
37 DRAWFN_ORDER_MAX * \
38 DRAWFN_FORMAT_MAX)
39
40-drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
41+extern drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
42
43-drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
44+extern drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
45
46-drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
47+extern drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
48
49-drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
50+extern drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
51
52-drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
53+extern drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
54
55 #endif
diff --git a/recipes-extended/xvisor/xvisor_git.bb b/recipes-extended/xvisor/xvisor_git.bb
index 9e885f02..831c943b 100644
--- a/recipes-extended/xvisor/xvisor_git.bb
+++ b/recipes-extended/xvisor/xvisor_git.bb
@@ -11,8 +11,9 @@ inherit autotools-brokensep
11# This version support the RISC-V v0.5.0 Hypervisor extensions 11# This version support the RISC-V v0.5.0 Hypervisor extensions
12SRCREV = "b3dac5b1f61f23f21dc59b3880897cff78f3b618" 12SRCREV = "b3dac5b1f61f23f21dc59b3880897cff78f3b618"
13SRC_URI = "git://github.com/avpatel/xvisor-next.git \ 13SRC_URI = "git://github.com/avpatel/xvisor-next.git \
14 file://0001-TESTS-Don-t-specify-mabi-or-march-for-RISC-V.patch \ 14 file://0001-TESTS-Don-t-specify-mabi-or-march-for-RISC-V.patch \
15 " 15 file://0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch \
16"
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19