diff options
3 files changed, 140 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/sharutils/sharutils/0001-Fix-building-with-GCC-10.patch b/meta-oe/recipes-support/sharutils/sharutils/0001-Fix-building-with-GCC-10.patch new file mode 100644 index 0000000000..9e2ebe7564 --- /dev/null +++ b/meta-oe/recipes-support/sharutils/sharutils/0001-Fix-building-with-GCC-10.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From b7dd97708b9d0ed09d8d7ac435f8b25eadbf6487 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petr=20P=C3=83=C2=ADsa=C3=85=E2=84=A2?= <address@hidden> | ||
3 | Date: Thu, 13 Aug 2020 11:20:38 -0700 | ||
4 | Subject: [PATCH 1/2] Fix building with GCC 10 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | GCC 10 defaults to -fno-common that results into errors on multiple | ||
10 | global variable definitions: | ||
11 | |||
12 | /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: | ||
13 | shar-opts.o:(.data.rel.ro.local+0x0): multiple definition of | ||
14 | `program_name'; shar.o:(.rodata+0x10): first defined here | ||
15 | |||
16 | This patch fixes it by changing the definitions in header files into extern | ||
17 | declarations. | ||
18 | |||
19 | <https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html> | ||
20 | |||
21 | Signed-off-by: Petr PÃsaÅ™ <address@hidden> | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | src/shar-opts.h | 2 +- | ||
25 | src/shar-std.def | 2 +- | ||
26 | src/unshar-opts.h | 2 +- | ||
27 | src/uudecode-opts.h | 2 +- | ||
28 | src/uuencode-opts.h | 2 +- | ||
29 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
30 | |||
31 | diff --git a/src/shar-opts.h b/src/shar-opts.h | ||
32 | index 172676f..f6e4e79 100644 | ||
33 | --- a/src/shar-opts.h | ||
34 | +++ b/src/shar-opts.h | ||
35 | @@ -352,7 +352,7 @@ extern "C" { | ||
36 | * global exported definitions | ||
37 | */ | ||
38 | #include "local.h" | ||
39 | -char const * const program_name; | ||
40 | +extern char const * const program_name; | ||
41 | |||
42 | extern bool initialization_done; | ||
43 | extern int optidx; | ||
44 | diff --git a/src/shar-std.def b/src/shar-std.def | ||
45 | index ed06b77..a28f61c 100644 | ||
46 | --- a/src/shar-std.def | ||
47 | +++ b/src/shar-std.def | ||
48 | @@ -41,7 +41,7 @@ no-misuse-usage; | ||
49 | usage-message; | ||
50 | die-code; | ||
51 | |||
52 | -export = '#include "local.h"'"\nchar const * const program_name;"; | ||
53 | +export = '#include "local.h"'"\nextern char const * const program_name;"; | ||
54 | |||
55 | #shell | ||
56 | echo "include = 'char const * const program_name = \"${progname}\";';" | ||
57 | diff --git a/src/unshar-opts.h b/src/unshar-opts.h | ||
58 | index 568ffca..aa85833 100644 | ||
59 | --- a/src/unshar-opts.h | ||
60 | +++ b/src/unshar-opts.h | ||
61 | @@ -192,7 +192,7 @@ extern "C" { | ||
62 | extern size_t separator_str_len; | ||
63 | |||
64 | #include "local.h" | ||
65 | -char const * const program_name; | ||
66 | +extern char const * const program_name; | ||
67 | |||
68 | |||
69 | /* * * * * * | ||
70 | diff --git a/src/uudecode-opts.h b/src/uudecode-opts.h | ||
71 | index 5b74419..289a366 100644 | ||
72 | --- a/src/uudecode-opts.h | ||
73 | +++ b/src/uudecode-opts.h | ||
74 | @@ -170,7 +170,7 @@ extern "C" { | ||
75 | * global exported definitions | ||
76 | */ | ||
77 | #include "local.h" | ||
78 | -char const * const program_name; | ||
79 | +extern char const * const program_name; | ||
80 | |||
81 | |||
82 | /* * * * * * | ||
83 | diff --git a/src/uuencode-opts.h b/src/uuencode-opts.h | ||
84 | index 1a5b7bc..f2df0a8 100644 | ||
85 | --- a/src/uuencode-opts.h | ||
86 | +++ b/src/uuencode-opts.h | ||
87 | @@ -166,7 +166,7 @@ extern "C" { | ||
88 | * global exported definitions | ||
89 | */ | ||
90 | #include "local.h" | ||
91 | -char const * const program_name; | ||
92 | +extern char const * const program_name; | ||
93 | |||
94 | |||
95 | /* * * * * * | ||
96 | -- | ||
97 | 2.28.0 | ||
98 | |||
diff --git a/meta-oe/recipes-support/sharutils/sharutils/0002-Do-not-include-lib-md5.c-into-src-shar.c.patch b/meta-oe/recipes-support/sharutils/sharutils/0002-Do-not-include-lib-md5.c-into-src-shar.c.patch new file mode 100644 index 0000000000..d4a8d6fbae --- /dev/null +++ b/meta-oe/recipes-support/sharutils/sharutils/0002-Do-not-include-lib-md5.c-into-src-shar.c.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From ab981e1a973e83edb6ea19e6e84102f43ded0dcb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Aug 2020 11:22:40 -0700 | ||
4 | Subject: [PATCH 2/2] Do not include lib/md5.c into src/shar.c | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | ib/md5.o is part of libgnu.a that is linked to shar. There is no | ||
10 | point in linking md5.o twice into shar executable. Moreover SuSE | ||
11 | reports that this triggers a linking error with GCC 10: | ||
12 | |||
13 | /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: | ||
14 | ../lib/libgnu.a(md5.o): in function `md5_stream': | ||
15 | [ 30s] md5.c:(.text+0x15d): multiple definition of `md5_stream'; | ||
16 | shar.o:shar.c:(.text+0x28): first defined here | ||
17 | |||
18 | <https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html> | ||
19 | |||
20 | Signed-off-by: Petr PÃsaÅ™ <address@hidden> | ||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | --- | ||
23 | src/shar.c | 1 - | ||
24 | 1 file changed, 1 deletion(-) | ||
25 | |||
26 | diff --git a/src/shar.c b/src/shar.c | ||
27 | index 11cbada..6d7ed1d 100644 | ||
28 | --- a/src/shar.c | ||
29 | +++ b/src/shar.c | ||
30 | @@ -53,7 +53,6 @@ static const char cright_years_z[] = | ||
31 | |||
32 | #include "inttostr.h" | ||
33 | #include "liballoca.h" | ||
34 | -#include "md5.c" | ||
35 | #include "md5.h" | ||
36 | #include "quotearg.h" | ||
37 | #include "xalloc.h" | ||
38 | -- | ||
39 | 2.28.0 | ||
40 | |||
diff --git a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb index 930922ed48..48eb268939 100644 --- a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +++ b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb | |||
@@ -10,6 +10,8 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
10 | file://0001-Fix-build-with-clang.patch \ | 10 | file://0001-Fix-build-with-clang.patch \ |
11 | file://CVE-2018-1000097.patch \ | 11 | file://CVE-2018-1000097.patch \ |
12 | file://0001-Fix-build-with-recent-gettext.patch \ | 12 | file://0001-Fix-build-with-recent-gettext.patch \ |
13 | file://0001-Fix-building-with-GCC-10.patch \ | ||
14 | file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \ | ||
13 | " | 15 | " |
14 | SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800" | 16 | SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800" |
15 | SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637" | 17 | SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637" |