commit: 8150f54880d314e05ea95e167a77fab7af230146 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Sat May 2 18:42:21 2020 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sat May 2 18:47:06 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8150f548
app-shells/dash: fix build with gcc -fno-common Closes: https://bugs.gentoo.org/707364 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> app-shells/dash/dash-0.5.10.2-r1.ebuild | 5 ++- .../dash/files/dash-0.5.20.2-gcc-fno-common.patch | 38 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/app-shells/dash/dash-0.5.10.2-r1.ebuild b/app-shells/dash/dash-0.5.10.2-r1.ebuild index f04c97dff90..a552c0f62f0 100644 --- a/app-shells/dash/dash-0.5.10.2-r1.ebuild +++ b/app-shells/dash/dash-0.5.10.2-r1.ebuild @@ -19,7 +19,10 @@ RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" DEPEND="${RDEPEND} libedit? ( static? ( dev-libs/libedit[static-libs] ) )" -PATCHES=( "${FILESDIR}/${PN}-0.5.9.1-format-security.patch" ) +PATCHES=( + "${FILESDIR}/dash-0.5.9.1-format-security.patch" + "${FILESDIR}/dash-0.5.20.2-gcc-fno-common.patch" +) src_prepare() { default 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 new file mode 100644 index 00000000000..08d5ed08a39 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.20.2-gcc-fno-common.patch @@ -0,0 +1,38 @@ +From 4459ec7f6cd394b9d01bd9d537b0f04975583dff Mon Sep 17 00:00:00 2001 +From: Jeroen Roovers <[email protected]> +Date: Mon, 16 Mar 2020 19:25:00 +0100 +Subject: [PATCH] input: Fix compiling against libedit with -fno-common +To: [email protected] + +With -fno-common, which will be enabled by default in GCC 10, we see +this error: + +ld: input.o:(.bss+0x0): multiple definition of `el'; +histedit.o:(.bss+0x8): first defined here + +To fix this, simply remove the definition as it is not needed. + +Signed-off-by: Jeroen Roovers <[email protected]> +Signed-off-by: Mike Gilbert <[email protected]> +--- + src/input.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/input.c b/src/input.c +index ae0c4c8..e84eca8 100644 +--- a/src/input.c ++++ b/src/input.c +@@ -67,10 +67,6 @@ MKINIT char basebuf[IBUFSIZ]; /* buffer for top level input file */ + struct parsefile *parsefile = &basepf; /* current input file */ + int whichprompt; /* 1 == PS1, 2 == PS2 */ + +-#ifndef SMALL +-EditLine *el; /* cookie for editline package */ +-#endif +- + STATIC void pushfile(void); + static int preadfd(void); + static void setinputfd(int fd, int push); +-- +2.25.1 +
