commit:     b2832338426a96d988945b1b8e3af751ff27ba26
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  9 20:41:13 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 20:41:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2832338

games-roguelike/angband: fix build on pie gcc, bug #617982

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 +++-
 games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch | 13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/games-roguelike/angband/angband-4.0.5-r1.ebuild 
b/games-roguelike/angband/angband-4.0.5-r1.ebuild
index 473728f8c4a..48866f76317 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 00000000000..b4f3c5707d4
--- /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 $@

Reply via email to