public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/tftp-hpa/, net-ftp/tftp-hpa/files/
@ 2020-01-28 17:01 Mike Gilbert
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2020-01-28 17:01 UTC (permalink / raw
  To: gentoo-commits

commit:     863c825a497d3614d35a73cb2c4c1de95a709ca4
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 17:00:37 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 17:00:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=863c825a

net-ftp/tftp-hpa: fix build with gcc-10

Closes: https://bugs.gentoo.org/705834
Package-Manager: Portage-2.3.85_p2, Repoman-2.3.20_p36
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch | 42 ++++++++++++++++++++++++
 net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild          |  4 ++-
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch b/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch
new file mode 100644
index 00000000000..ff2488d5dfb
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch
@@ -0,0 +1,42 @@
+From 7afd5aa65fdabaa4583f6e1a84936eb9bdd33c65 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue, 21 Jan 2020 23:10:46 +0000
+Subject: [PATCH] tftp-hpa: fix build failure against gcc-10
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu tftp.o main.o ../common/libcommon.a -lreadline -liberty   -o tftp
+ld: main.o:(.bss+0x40):
+  multiple definition of `toplevel'; tftp.o:(.bss+0x100): first defined here
+collect2: error: ld returned 1 exit status
+make[1]: *** [Makefile:12: tftp] Error 1
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Bug: https://bugs.gentoo.org/705834
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ tftp/tftp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tftp/tftp.c b/tftp/tftp.c
+index d15da22..d067f96 100644
+--- a/tftp/tftp.c
++++ b/tftp/tftp.c
+@@ -48,7 +48,7 @@ extern int maxtimeout;
+ #define PKTSIZE    SEGSIZE+4
+ char ackbuf[PKTSIZE];
+ int timeout;
+-sigjmp_buf toplevel;
++extern sigjmp_buf toplevel;
+ sigjmp_buf timeoutbuf;
+ 
+ static void nak(int, const char *);
+-- 
+2.25.0
+

diff --git a/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild b/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild
index cafb4a38548..78723b2d830 100644
--- a/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild
+++ b/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -24,7 +24,9 @@ DEPEND="${CDEPEND}
 RDEPEND="${CDEPEND}
 	selinux? ( sec-policy/selinux-tftp )
 "
+
 src_prepare() {
+	epatch "${FILESDIR}"/tftp-hpa-5.2-gcc-10.patch
 	epatch_user
 
 	sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-28 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-28 17:01 [gentoo-commits] repo/gentoo:master commit in: net-ftp/tftp-hpa/, net-ftp/tftp-hpa/files/ Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox