summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-13 21:16:10 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-13 22:37:48 -0700
commit8e53fff2e95158643128eb7d2e5e6551586702c7 (patch)
treec7f565adcc3f6e1441b717b1690efc64ef9a28c7 /meta-oe/recipes-kernel
parentd23e9b96918c4c55d3c34f3ec78c74508e2f74b6 (diff)
downloadmeta-openembedded-8e53fff2e95158643128eb7d2e5e6551586702c7.tar.gz
makedumpfile: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch104
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb1
2 files changed, 105 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
new file mode 100644
index 0000000000..49777bcee9
--- /dev/null
+++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
@@ -0,0 +1,104 @@
1From 399f2c9a3acd5bd913e50a4dde52dee6527b297e Mon Sep 17 00:00:00 2001
2From: Kairui Song <kasong@redhat.com>
3Date: Wed, 29 Jan 2020 13:37:13 +0800
4Subject: [PATCH] [PATCH] Remove duplicated variable definitions
5
6When building on Fedora 32 (with GCC 10), following error is observed:
7
8/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2010: multiple definition of
9 `crash_reserved_mem_nr'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2010: first defined here
10/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2009: multiple definition of
11 `crash_reserved_mem'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2009: first defined here
12/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1278: multiple definition of
13 `parallel_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1278: first defined here
14/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1265: multiple definition of
15 `splitting_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1265: first defined here
16...
17collect2: error: ld returned 1 exit status
18make: *** [Makefile:97: makedumpfile] Error 1
19
20These variables are wrongly defined multiple times. So remove the
21duplicated definitions.
22
23Upstream-Status: Backport [https://github.com/kraj/makedumpfile/commit/399f2c9a3acd5bd913e50a4dde52dee6527b297e]
24Signed-off-by: Kairui Song <kasong@redhat.com>
25Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
26---
27 makedumpfile.c | 8 ++++----
28 makedumpfile.h | 8 ++++----
29 2 files changed, 8 insertions(+), 8 deletions(-)
30
31diff --git a/makedumpfile.c b/makedumpfile.c
32index e290fbd..ae7336a 100644
33--- a/makedumpfile.c
34+++ b/makedumpfile.c
35@@ -10954,7 +10954,7 @@ check_param_for_reassembling_dumpfile(int argc, char *argv[])
36 return FALSE;
37
38 if ((info->splitting_info
39- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
40+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
41 == NULL) {
42 MSG("Can't allocate memory for splitting_info.\n");
43 return FALSE;
44@@ -11042,7 +11042,7 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
45 return FALSE;
46 }
47 if ((info->splitting_info
48- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
49+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
50 == NULL) {
51 MSG("Can't allocate memory for splitting_info.\n");
52 return FALSE;
53@@ -11077,13 +11077,13 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
54
55 if (info->num_threads) {
56 if ((info->parallel_info =
57- malloc(sizeof(parallel_info_t) * info->num_threads))
58+ malloc(sizeof(struct parallel_info) * info->num_threads))
59 == NULL) {
60 MSG("Can't allocate memory for parallel_info.\n");
61 return FALSE;
62 }
63
64- memset(info->parallel_info, 0, sizeof(parallel_info_t)
65+ memset(info->parallel_info, 0, sizeof(struct parallel_info)
66 * info->num_threads);
67 }
68
69diff --git a/makedumpfile.h b/makedumpfile.h
70index 68d9691..7217407 100644
71--- a/makedumpfile.h
72+++ b/makedumpfile.h
73@@ -1262,7 +1262,7 @@ struct splitting_info {
74 mdf_pfn_t end_pfn;
75 off_t offset_eraseinfo;
76 unsigned long size_eraseinfo;
77-} splitting_info_t;
78+};
79
80 struct parallel_info {
81 int fd_memory;
82@@ -1275,7 +1275,7 @@ struct parallel_info {
83 #ifdef USELZO
84 lzo_bytep wrkmem;
85 #endif
86-} parallel_info_t;
87+};
88
89 struct ppc64_vmemmap {
90 unsigned long phys;
91@@ -2006,8 +2006,8 @@ struct memory_range {
92 };
93
94 #define CRASH_RESERVED_MEM_NR 8
95-struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
96-int crash_reserved_mem_nr;
97+extern struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
98+extern int crash_reserved_mem_nr;
99
100 unsigned long read_vmcoreinfo_symbol(char *str_symbol);
101 int readmem(int type_addr, unsigned long long addr, void *bufptr, size_t size);
102--
1032.28.0
104
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb
index 8d1676a4c6..165e192cb1 100644
--- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb
+++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb
@@ -24,6 +24,7 @@ SRC_URI = "\
24 ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \ 24 ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \
25 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ 25 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
26 file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \ 26 file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \
27 file://0001-PATCH-Remove-duplicated-variable-definitions.patch \
27" 28"
28SRC_URI[md5sum] = "808ef840ca49ca6bfde77c097cf429f5" 29SRC_URI[md5sum] = "808ef840ca49ca6bfde77c097cf429f5"
29SRC_URI[sha256sum] = "e702fbdf62b4cd829a76e46f3e24eb3fc7501918b85ebdcd8baef4f53d6ee2c8" 30SRC_URI[sha256sum] = "e702fbdf62b4cd829a76e46f3e24eb3fc7501918b85ebdcd8baef4f53d6ee2c8"