commit:     0aa5704924154af94dd39bc9f8a47e1338564ebe
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  8 19:52:23 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jan  8 19:52:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=0aa57049

sys-libs/libcxxabi: fix linking on ppc (need -fPIC explicitly)

Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-libs/libcxxabi/libcxxabi-3.5.1.ebuild | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libcxxabi/libcxxabi-3.5.1.ebuild 
b/sys-libs/libcxxabi/libcxxabi-3.5.1.ebuild
index 7e831423fc..1073e922e3 100644
--- a/sys-libs/libcxxabi/libcxxabi-3.5.1.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-3.5.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id $
 
@@ -58,6 +58,10 @@ src_prepare() {
                        -e "s,-arch i386 -arch x86_64,,g" \
                        lib/buildit
 
+       if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+               sed -i -e '/RC_CFLAGS=""/s/""/"-fPIC"/' lib/buildit || die
+       fi
+
        # assert.h refers to eprintf which is nowhere to be found. That's why
        # everyone (libstdc++, clang compiler-rt) bring their own
        # implementation. Ours is nicked from Apple's patch to libstdc++-39.
@@ -65,7 +69,7 @@ src_prepare() {
                epatch "${FILESDIR}"/${PN}-3.5.1-eprintf.patch
 
        sed -i -e 
"s,/usr/lib/libc++abi\.dylib,${EPREFIX}/usr/lib/libc++abi.dylib,g" \
-               lib/buildit
+               lib/buildit || die
 }
 
 src_compile() {

Reply via email to