1 |
commit: 1265f8991883546f19b9d3a58e6cedf1c0ce4465 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 11:45:49 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 11:46:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1265f899 |
7 |
|
8 |
sys-libs/gdbm: tweak for gcc-10, bug #705898 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/705898 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
13 |
|
14 |
sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch | 40 ++++++++++++++++++++++++++++ |
15 |
sys-libs/gdbm/gdbm-1.18.1.ebuild | 2 ++ |
16 |
2 files changed, 42 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..9b3e3d736c1 |
21 |
--- /dev/null |
22 |
+++ b/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch |
23 |
@@ -0,0 +1,40 @@ |
24 |
+From ab05ea727942b5c1469e2e86548581264c6e2de4 Mon Sep 17 00:00:00 2001 |
25 |
+From: Sergei Trofimovich <slyfox@g.o> |
26 |
+Date: Sat, 2 May 2020 12:39:39 +0100 |
27 |
+Subject: [PATCH] gdbm: fix link failure against gcc-10 |
28 |
+ |
29 |
+Before the change on gcc-10 link failed as: |
30 |
+``` |
31 |
+ CCLD gdbmtool |
32 |
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args'; |
33 |
+ gdbmtool.o:(.data.rel.local+0x260): first defined here |
34 |
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc'; |
35 |
+ gdbmtool.o:(.data.rel.local+0x268): first defined here |
36 |
+``` |
37 |
+ |
38 |
+gcc-10 will change the default from -fcommon to fno-common: |
39 |
+ https://gcc.gnu.org/PR85678. |
40 |
+ |
41 |
+The fix is to avoid multiple definition and rely on |
42 |
+declarations only. |
43 |
+ |
44 |
+Bug: https://bugs.gentoo.org/705898 |
45 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
46 |
+--- |
47 |
+ src/parseopt.c | 2 -- |
48 |
+ 1 file changed, 2 deletions(-) |
49 |
+ |
50 |
+--- a/src/parseopt.c |
51 |
++++ b/src/parseopt.c |
52 |
+@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin) |
53 |
+ } |
54 |
+ |
55 |
+ char *parseopt_program_name; |
56 |
+-char *parseopt_program_doc; |
57 |
+-char *parseopt_program_args; |
58 |
+ const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; |
59 |
+ void (*parseopt_help_hook) (FILE *stream); |
60 |
+ |
61 |
+-- |
62 |
+2.26.2 |
63 |
+ |
64 |
|
65 |
diff --git a/sys-libs/gdbm/gdbm-1.18.1.ebuild b/sys-libs/gdbm/gdbm-1.18.1.ebuild |
66 |
index 5ed06c51213..5b38687c43c 100644 |
67 |
--- a/sys-libs/gdbm/gdbm-1.18.1.ebuild |
68 |
+++ b/sys-libs/gdbm/gdbm-1.18.1.ebuild |
69 |
@@ -19,6 +19,8 @@ DEPEND=" |
70 |
" |
71 |
RDEPEND="${DEPEND}" |
72 |
|
73 |
+PATCHES=("${FILESDIR}"/${PN}-1.18.1-gcc-10.patch) |
74 |
+ |
75 |
src_prepare() { |
76 |
default |
77 |
eautoreconf |