From b2832338426a96d988945b1b8e3af751ff27ba26 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 9 Sep 2017 21:41:13 +0100 Subject: [PATCH] games-roguelike/angband: fix build on pie gcc, bug #617982 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/617982 Package-Manager: Portage-2.3.8, Repoman-2.3.3 --- games-roguelike/angband/angband-4.0.5-r1.ebuild | 4 +++- .../angband/files/angband-4.0.5-pie-gcc.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch diff --git a/games-roguelike/angband/angband-4.0.5-r1.ebuild b/games-roguelike/angband/angband-4.0.5-r1.ebuild index 473728f8c4ab..48866f763176 100644 --- a/games-roguelike/angband/angband-4.0.5-r1.ebuild +++ b/games-roguelike/angband/angband-4.0.5-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -27,6 +27,8 @@ DEPEND="${RDEPEND} dev-python/docutils virtual/pkgconfig" +PATCHES=("${FILESDIR}"/${P}-pie-gcc.patch) + src_prepare() { default diff --git a/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch b/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch new file mode 100644 index 000000000000..b4f3c5707d43 --- /dev/null +++ b/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch @@ -0,0 +1,13 @@ +Allow gcc to construct correct partial linking command to ld. +Otherwise ld gets an incompatible mix of '-pie -r'. + +https://bugs.gentoo.org/617982 +diff --git a/src/Makefile b/src/Makefile +index 79be4cc..d27bb91 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -33,3 +33,3 @@ win/$(PROGNAME).res: win/$(PROGNAME).rc + $(PROGNAME).o: $(OBJECTS) +- $(LD) -nostdlib -Wl,-r -o $@ $(OBJECTS) ++ $(LD) -nostdlib -r -o $@ $(OBJECTS) + @printf "%10s %-20s\n" LINK $@ -- 2.26.2