diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-26 11:24:35 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-26 11:24:58 +0000 |
commit | 17a74b14df557a6431e1b57dd4afdeb58717b030 (patch) | |
tree | b412a855281262b954dfe2366b54ab4bb001ff96 /games-util | |
parent | sci-libs/libgeodecomp: Fix VisIt removal (diff) | |
download | gentoo-17a74b14df557a6431e1b57dd4afdeb58717b030.tar.gz gentoo-17a74b14df557a6431e1b57dd4afdeb58717b030.tar.bz2 gentoo-17a74b14df557a6431e1b57dd4afdeb58717b030.zip |
games-util/qstat: tweak for gcc-10, bug #706390
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706390
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/qstat/files/qstat-2.14-gcc-10.patch | 51 | ||||
-rw-r--r-- | games-util/qstat/qstat-2.14.ebuild | 6 |
2 files changed, 56 insertions, 1 deletions
diff --git a/games-util/qstat/files/qstat-2.14-gcc-10.patch b/games-util/qstat/files/qstat-2.14-gcc-10.patch new file mode 100644 index 000000000000..e16e701330a0 --- /dev/null +++ b/games-util/qstat/files/qstat-2.14-gcc-10.patch @@ -0,0 +1,51 @@ +From 878fa5fd6475685c3465a6e71a10c2fc61c1a09c Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Sun, 26 Jan 2020 11:15:10 +0000 +Subject: [PATCH] qstat: fix build failure against gcc-10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +gcc ... -o qstat ... +ld: config.o:qstat/display_json.h:24: + multiple definition of `json_printed'; xform.o:qstat/display_json.h:24: first defined here +ld: config.o:qstat/display_json.h:23: + multiple definition of `json_encoding'; xform.o:qstat/display_json.h:23: first defined here +``` + +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. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/706390 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + debug.c | 2 +- + debug.h | 2 +- + +--- a/debug.c ++++ b/debug.c +@@ -114,6 +114,7 @@ static void _dump_packet(const char* tag, const char* buf, int buflen) + close(fd); + } + ++int do_dump = 0; + ssize_t send_dump(int s, const void *buf, size_t len, int flags) + { + if(do_dump) +--- a/debug.h ++++ b/debug.h +@@ -47,7 +47,7 @@ void dump_packet(const char* buf, int buflen); + #endif + #include <sys/types.h> + #include <sys/stat.h> +-int do_dump; ++extern int do_dump; + ssize_t send_dump(int s, const void *buf, size_t len, int flags); + #ifndef QSTAT_DEBUG_C + #define send(s, buf, len, flags) send_dump(s, buf, len, flags) diff --git a/games-util/qstat/qstat-2.14.ebuild b/games-util/qstat/qstat-2.14.ebuild index 3dbdb38a119f..ee781cb84953 100644 --- a/games-util/qstat/qstat-2.14.ebuild +++ b/games-util/qstat/qstat-2.14.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -18,6 +18,10 @@ DEPEND="!sys-cluster/torque" DOCS=( CHANGES.txt COMPILE.txt template/README.txt ) +PATCHES=( + "${FILESDIR}"/${P}-gcc-10.patch +) + src_prepare() { default eautoreconf |