[Buildroot] [git commit branch/2021.05.x] package/kexec-tools: fix build with gcc 10

Peter Korsgaard peter at korsgaard.com
Tue Aug 3 09:33:53 UTC 2021


commit: https://git.buildroot.net/buildroot/commit/?id=0eadf4f0ac339e3e8881ea1b3b060fae0dc33506
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.05.x

Build is broken with gcc 10 since bump to version 2.0.22 in commit
cadb8f2f317bf37c13aea98ac1c81bf8566aad92:

/tmp/instance-1/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: kexec/arch/ppc/kexec-elf-ppc.o:(.sbss+0x0): multiple definition of `ramdisk'; kexec/arch/ppc/kexec-ppc.o:(.sbss+0x0): first defined here

Fixes:
 - http://autobuild.buildroot.org/results/22932529f925630ec6db3c6a4eaebbda68b3fc16

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists at googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 487c7ba95db8097d206119868fd1187b656e3a9c)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 ...ls-Remove-duplicate-definition-of-ramdisk.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/package/kexec/0001-kexec-tools-Remove-duplicate-definition-of-ramdisk.patch b/package/kexec/0001-kexec-tools-Remove-duplicate-definition-of-ramdisk.patch
new file mode 100644
index 0000000000..173323bff8
--- /dev/null
+++ b/package/kexec/0001-kexec-tools-Remove-duplicate-definition-of-ramdisk.patch
@@ -0,0 +1,32 @@
+From 5e7ce27626a44428c01e0e5ab3fe60ef98ca788c Mon Sep 17 00:00:00 2001
+From: Petr Tesarik <ptesarik at suse.cz>
+Date: Mon, 26 Apr 2021 15:29:51 +0200
+Subject: kexec-tools: Remove duplicate definition of ramdisk
+
+The ramdisk variable is defined in kexec/arch/ppc/kexec-ppc.c. This
+other definition is not needed and breaks build with -fno-common.
+
+Signed-off-by: Petr Tesarik <ptesarik at suse.com>
+Signed-off-by: Simon Horman <horms at verge.net.au>
+[Retrieved from:
+https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=5e7ce27626a44428c01e0e5ab3fe60ef98ca788c]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+---
+ kexec/arch/ppc/kexec-elf-ppc.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c
+index ad43ad1..4a4886e 100644
+--- a/kexec/arch/ppc/kexec-elf-ppc.c
++++ b/kexec/arch/ppc/kexec-elf-ppc.c
+@@ -33,7 +33,6 @@
+ static const int probe_debug = 0;
+ 
+ unsigned char reuse_initrd;
+-const char *ramdisk;
+ int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
+ 			char *);
+ 
+-- 
+cgit 1.2.3-1.el7
+


More information about the buildroot mailing list