summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2010-09-19 16:45:24 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2010-09-19 16:45:24 +0000
commit1a22188991d40af92a6571d798da10ff4035fedf (patch)
tree37be830b3e70a91710836036db5fd0fdb013e449 /dev-lang/ghc/ghc-6.10.4-r1.ebuild
parentRaise gtk+ dependency per bug #336513. (diff)
downloadgentoo-2-1a22188991d40af92a6571d798da10ff4035fedf.tar.gz
gentoo-2-1a22188991d40af92a6571d798da10ff4035fedf.tar.bz2
gentoo-2-1a22188991d40af92a6571d798da10ff4035fedf.zip
Make ghc usable on hardened. Disabled enforced memory protection (bug #299709). mmap('rwx') is used by ghc to implement dynamic linking.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/ghc/ghc-6.10.4-r1.ebuild')
-rw-r--r--dev-lang/ghc/ghc-6.10.4-r1.ebuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/dev-lang/ghc/ghc-6.10.4-r1.ebuild b/dev-lang/ghc/ghc-6.10.4-r1.ebuild
index 5b80455147f6..0c0d56233ff5 100644
--- a/dev-lang/ghc/ghc-6.10.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-6.10.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.4-r1.ebuild,v 1.10 2010/07/21 21:49:33 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.4-r1.ebuild,v 1.11 2010/09/19 16:45:24 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
+inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -157,6 +157,11 @@ src_unpack() {
# See bug #313635.
sed -i -e "s|wrapped|wrapped ${GHC_CFLAGS}|" \
"${WORKDIR}/usr/bin/ghc-${PV}"
+
+ # allow hardened users use vanilla biary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${P}/ghc"
fi
if use binary; then
@@ -305,6 +310,11 @@ src_install() {
DESTDIR="${D}" \
|| die "make ${insttarget} failed"
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ # so mark resulting binary
+ pax-mark -m "${D}/usr/$(get_libdir)/${P}/ghc"
+
dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
dobashcompletion "${FILESDIR}/ghc-bash-completion"