1 |
commit: 1c6d84beced12c06ae08c04955d5bb6f799a568e |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 29 11:01:18 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 29 11:04:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c6d84be |
7 |
|
8 |
net-analyzer/nagios-plugins-linux-madrisan: fix build w. -fno-common |
9 |
|
10 |
Closes: https://bugs.gentoo.org/706536 |
11 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
12 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
13 |
|
14 |
...-plugins-linux-madrisan-25-fix-fno-common.patch | 37 ++++++++++++++++++++++ |
15 |
.../nagios-plugins-linux-madrisan-25-r1.ebuild | 6 +++- |
16 |
2 files changed, 42 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..74bddd66e74 |
21 |
--- /dev/null |
22 |
+++ b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch |
23 |
@@ -0,0 +1,37 @@ |
24 |
+From 4936ca25f3e9a2875ce063033e5e8f3a3590dab2 Mon Sep 17 00:00:00 2001 |
25 |
+From: Davide Madrisan <davide.madrisan@×××××.com> |
26 |
+Date: Mon, 27 Jan 2020 22:00:41 +0100 |
27 |
+Subject: [PATCH] The build fails when '-fno-common' is added to CFLAGS |
28 |
+ |
29 |
+As reported by 'sbraz', the build stops with the error message: |
30 |
+ |
31 |
+ (.bss+0x8): multiple definition of `program_name' |
32 |
+ (.bss+0x0): multiple definition of `program_name_short' |
33 |
+ |
34 |
+This flag will be apparently enabled by default in gcc 10. |
35 |
+ |
36 |
+Fix this build problem by correctly referencing as extern both |
37 |
+the variables in the header file. |
38 |
+ |
39 |
+Signed-off-by: Davide Madrisan <davide.madrisan@×××××.com> |
40 |
+--- |
41 |
+ include/progname.h | 4 ++-- |
42 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
43 |
+ |
44 |
+diff --git a/include/progname.h b/include/progname.h |
45 |
+index 576ed16..847122a 100644 |
46 |
+--- a/include/progname.h |
47 |
++++ b/include/progname.h |
48 |
+@@ -25,10 +25,10 @@ extern "C" { |
49 |
+ #endif |
50 |
+ |
51 |
+ /* String containing name the program is called with. */ |
52 |
+- const char *program_name; |
53 |
++ extern const char *program_name; |
54 |
+ |
55 |
+ /* String containing a short version of 'program_name'. */ |
56 |
+- const char *program_name_short; |
57 |
++ extern const char *program_name_short; |
58 |
+ |
59 |
+ /* Set program_name, based on argv[0]. |
60 |
+ argv0 must be a string allocated with indefinite extent, and must not be |
61 |
|
62 |
diff --git a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild |
63 |
index 6367fdc2f4e..284d0d9d1a8 100644 |
64 |
--- a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild |
65 |
+++ b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild |
66 |
@@ -1,4 +1,4 @@ |
67 |
-# Copyright 2019 Gentoo Authors |
68 |
+# Copyright 2020 Gentoo Authors |
69 |
# Distributed under the terms of the GNU General Public License v2 |
70 |
|
71 |
EAPI=7 |
72 |
@@ -20,6 +20,10 @@ IUSE="curl" |
73 |
DEPEND="curl? ( net-misc/curl:0= )" |
74 |
RDEPEND="${DEPEND}" |
75 |
|
76 |
+# https://github.com/madrisan/nagios-plugins-linux/issues/48 |
77 |
+# Will be in the next release |
78 |
+PATCHES=( "${FILESDIR}/${P}-fix-fno-common.patch" ) |
79 |
+ |
80 |
S="${WORKDIR}/${MY_P}" |
81 |
|
82 |
src_prepare() { |