app-arch/sharutils: tweak for gcc-10, bug #706256
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 2 May 2020 12:15:03 +0000 (13:15 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 2 May 2020 12:18:52 +0000 (13:18 +0100)
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706256
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch [new file with mode: 0644]
app-arch/sharutils/sharutils-4.15.2-r1.ebuild

diff --git a/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch b/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch
new file mode 100644 (file)
index 0000000..4a0c02f
--- /dev/null
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/706256
+
+Fix build failure on gcc-10/-fno-common.
+
+--- a/src/shar-opts.h
++++ b/src/shar-opts.h
+@@ -352,7 +352,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ extern bool initialization_done;
+ extern int optidx;
+--- a/src/unshar-opts.h
++++ b/src/unshar-opts.h
+@@ -192,7 +192,7 @@ extern "C" {
+ extern size_t       separator_str_len;
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ /* * * * * *
+--- a/src/uudecode-opts.h
++++ b/src/uudecode-opts.h
+@@ -170,7 +170,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ /* * * * * *
+--- a/src/uuencode-opts.h
++++ b/src/uuencode-opts.h
+@@ -166,7 +166,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ /* * * * * *
index dc4356b4ead700b54da293a5c5605923de9c345d..00e6532922b59bf362eaeea436a3ba24ffc6d92e 100644 (file)
@@ -26,6 +26,7 @@ src_prepare() {
 
        epatch "${FILESDIR}/sharutils-4.15.2-glibc228.patch"
        epatch "${FILESDIR}/sharutils-4.15.2-CVE-2018-1000097.patch"
+       epatch "${FILESDIR}/sharutils-4.15.2-gcc-10.patch"
 
        # Upstream is aware but thinks this isn't a bug/problem in sharutils itself
        # See http://lists.gnu.org/archive/html/bug-gnu-utils/2013-10/msg00011.html