commit:     123f0d077921cf488309e0213ff979453cf2a981
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  5 08:08:10 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Apr  5 08:08:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=123f0d07

dev-util/valgrind: fix linking on Solaris

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-util/valgrind/valgrind-3.13.0-r2.ebuild | 11 ++++++++++-
 dev-util/valgrind/valgrind-9999.ebuild      |  9 +++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/dev-util/valgrind/valgrind-3.13.0-r2.ebuild 
b/dev-util/valgrind/valgrind-3.13.0-r2.ebuild
index f509e509703..0ef938d860f 100644
--- a/dev-util/valgrind/valgrind-3.13.0-r2.ebuild
+++ b/dev-util/valgrind/valgrind-3.13.0-r2.ebuild
@@ -15,7 +15,7 @@ if [[ ${PV} == "9999" ]]; then
        inherit git-r3
 else
        SRC_URI="ftp://sourceware.org/pub/valgrind/${P}.tar.bz2";
-       KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux 
~x86-linux ~x64-macos ~x86-macos"
+       KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux 
~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
 fi
 
 DEPEND="mpi? ( virtual/mpi )"
@@ -37,6 +37,15 @@ src_prepare() {
        # Fix --xml-socket command line option (qt-creator), bug #641790
        eapply "${FILESDIR}"/${P}-xml-socket.patch
 
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # upstream doesn't support this, but we don't build with
+               # Sun/Oracle ld, we have a GNU toolchain, so get some things
+               # working the Linux/GNU way
+               find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | 
xargs \
+                       sed -i -e 
's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
+               cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
+       fi
+
        # Allow users to test their own patches
        eapply_user
 

diff --git a/dev-util/valgrind/valgrind-9999.ebuild 
b/dev-util/valgrind/valgrind-9999.ebuild
index 2b96d5f5150..b7152e95dc5 100644
--- a/dev-util/valgrind/valgrind-9999.ebuild
+++ b/dev-util/valgrind/valgrind-9999.ebuild
@@ -31,6 +31,15 @@ src_prepare() {
        # Respect CFLAGS, LDFLAGS
        eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
 
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # upstream doesn't support this, but we don't build with
+               # Sun/Oracle ld, we have a GNU toolchain, so get some things
+               # working the Linux/GNU way
+               find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | 
xargs \
+                       sed -i -e 
's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
+               cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
+       fi
+
        # Allow users to test their own patches
        eapply_user
 

Reply via email to