summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-02 12:45:49 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-02 12:46:04 +0100
commit1265f8991883546f19b9d3a58e6cedf1c0ce4465 (patch)
tree55409eee767bf63aa813e4998ceb506366a2da72 /sys-libs/gdbm
parentmedia-video/obs-studio: remove version 25.0.3 (diff)
downloadgentoo-1265f8991883546f19b9d3a58e6cedf1c0ce4465.tar.gz
gentoo-1265f8991883546f19b9d3a58e6cedf1c0ce4465.tar.bz2
gentoo-1265f8991883546f19b9d3a58e6cedf1c0ce4465.zip
sys-libs/gdbm: tweak for gcc-10, bug #705898
Closes: https://bugs.gentoo.org/705898 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-libs/gdbm')
-rw-r--r--sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch40
-rw-r--r--sys-libs/gdbm/gdbm-1.18.1.ebuild2
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch b/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch
new file mode 100644
index 000000000000..9b3e3d736c15
--- /dev/null
+++ b/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch
@@ -0,0 +1,40 @@
+From ab05ea727942b5c1469e2e86548581264c6e2de4 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 2 May 2020 12:39:39 +0100
+Subject: [PATCH] gdbm: fix link failure against gcc-10
+
+Before the change on gcc-10 link failed as:
+```
+ CCLD gdbmtool
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args';
+ gdbmtool.o:(.data.rel.local+0x260): first defined here
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc';
+ gdbmtool.o:(.data.rel.local+0x268): first defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+ https://gcc.gnu.org/PR85678.
+
+The fix is to avoid multiple definition and rely on
+declarations only.
+
+Bug: https://bugs.gentoo.org/705898
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ src/parseopt.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/src/parseopt.c
++++ b/src/parseopt.c
+@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin)
+ }
+
+ char *parseopt_program_name;
+-char *parseopt_program_doc;
+-char *parseopt_program_args;
+ const char *program_bug_address = "<" PACKAGE_BUGREPORT ">";
+ void (*parseopt_help_hook) (FILE *stream);
+
+--
+2.26.2
+
diff --git a/sys-libs/gdbm/gdbm-1.18.1.ebuild b/sys-libs/gdbm/gdbm-1.18.1.ebuild
index 5ed06c512139..5b38687c43c9 100644
--- a/sys-libs/gdbm/gdbm-1.18.1.ebuild
+++ b/sys-libs/gdbm/gdbm-1.18.1.ebuild
@@ -19,6 +19,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=("${FILESDIR}"/${PN}-1.18.1-gcc-10.patch)
+
src_prepare() {
default
eautoreconf