From 2fc78c6750cb4d92e6411b71f47218ea51335763 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 2 May 2020 13:15:03 +0100 Subject: [PATCH] app-arch/sharutils: tweak for gcc-10, bug #706256 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .../files/sharutils-4.15.2-gcc-10.patch | 48 +++++++++++++++++++ app-arch/sharutils/sharutils-4.15.2-r1.ebuild | 1 + 2 files changed, 49 insertions(+) create mode 100644 app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch 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 index 000000000000..4a0c02f5ba9b --- /dev/null +++ b/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch @@ -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; + + + /* * * * * * diff --git a/app-arch/sharutils/sharutils-4.15.2-r1.ebuild b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild index dc4356b4ead7..00e6532922b5 100644 --- a/app-arch/sharutils/sharutils-4.15.2-r1.ebuild +++ b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild @@ -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 -- 2.26.2