blob: 9b3e3d736c155b260c1fbe31dc3968f250a68a8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|