Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/dash/, app-shells/dash/files/
Date: Sat, 02 May 2020 18:47:18
Message-Id: 1588445226.8150f54880d314e05ea95e167a77fab7af230146.floppym@gentoo
1 commit: 8150f54880d314e05ea95e167a77fab7af230146
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 2 18:42:21 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat May 2 18:47:06 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8150f548
7
8 app-shells/dash: fix build with gcc -fno-common
9
10 Closes: https://bugs.gentoo.org/707364
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 app-shells/dash/dash-0.5.10.2-r1.ebuild | 5 ++-
14 .../dash/files/dash-0.5.20.2-gcc-fno-common.patch | 38 ++++++++++++++++++++++
15 2 files changed, 42 insertions(+), 1 deletion(-)
16
17 diff --git a/app-shells/dash/dash-0.5.10.2-r1.ebuild b/app-shells/dash/dash-0.5.10.2-r1.ebuild
18 index f04c97dff90..a552c0f62f0 100644
19 --- a/app-shells/dash/dash-0.5.10.2-r1.ebuild
20 +++ b/app-shells/dash/dash-0.5.10.2-r1.ebuild
21 @@ -19,7 +19,10 @@ RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
22 DEPEND="${RDEPEND}
23 libedit? ( static? ( dev-libs/libedit[static-libs] ) )"
24
25 -PATCHES=( "${FILESDIR}/${PN}-0.5.9.1-format-security.patch" )
26 +PATCHES=(
27 + "${FILESDIR}/dash-0.5.9.1-format-security.patch"
28 + "${FILESDIR}/dash-0.5.20.2-gcc-fno-common.patch"
29 +)
30
31 src_prepare() {
32 default
33
34 diff --git a/app-shells/dash/files/dash-0.5.20.2-gcc-fno-common.patch b/app-shells/dash/files/dash-0.5.20.2-gcc-fno-common.patch
35 new file mode 100644
36 index 00000000000..08d5ed08a39
37 --- /dev/null
38 +++ b/app-shells/dash/files/dash-0.5.20.2-gcc-fno-common.patch
39 @@ -0,0 +1,38 @@
40 +From 4459ec7f6cd394b9d01bd9d537b0f04975583dff Mon Sep 17 00:00:00 2001
41 +From: Jeroen Roovers <jer@g.o>
42 +Date: Mon, 16 Mar 2020 19:25:00 +0100
43 +Subject: [PATCH] input: Fix compiling against libedit with -fno-common
44 +To: dash@×××××××××××.org
45 +
46 +With -fno-common, which will be enabled by default in GCC 10, we see
47 +this error:
48 +
49 +ld: input.o:(.bss+0x0): multiple definition of `el';
50 +histedit.o:(.bss+0x8): first defined here
51 +
52 +To fix this, simply remove the definition as it is not needed.
53 +
54 +Signed-off-by: Jeroen Roovers <jer@g.o>
55 +Signed-off-by: Mike Gilbert <floppym@g.o>
56 +---
57 + src/input.c | 4 ----
58 + 1 file changed, 4 deletions(-)
59 +
60 +diff --git a/src/input.c b/src/input.c
61 +index ae0c4c8..e84eca8 100644
62 +--- a/src/input.c
63 ++++ b/src/input.c
64 +@@ -67,10 +67,6 @@ MKINIT char basebuf[IBUFSIZ]; /* buffer for top level input file */
65 + struct parsefile *parsefile = &basepf; /* current input file */
66 + int whichprompt; /* 1 == PS1, 2 == PS2 */
67 +
68 +-#ifndef SMALL
69 +-EditLine *el; /* cookie for editline package */
70 +-#endif
71 +-
72 + STATIC void pushfile(void);
73 + static int preadfd(void);
74 + static void setinputfd(int fd, int push);
75 +--
76 +2.25.1
77 +