summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2011-08-23 18:08:05 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2011-08-23 18:08:05 +0000
commitdfcac729820a1a78043729ad5fd34f68876b0ffd (patch)
treef3987c46ddcf7a735468be27e4e26f0e50d6a79b /dev-lang/ghc
parentAdd libtxc_dxtn to portage, bug 65607 (diff)
downloadgentoo-2-dfcac729820a1a78043729ad5fd34f68876b0ffd.tar.gz
gentoo-2-dfcac729820a1a78043729ad5fd34f68876b0ffd.tar.bz2
gentoo-2-dfcac729820a1a78043729ad5fd34f68876b0ffd.zip
QA: Fixed executable stack in AdjustorAsm.o
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/ChangeLog6
-rw-r--r--dev-lang/ghc/files/ghc-7.0.4-nxstack.patch31
-rw-r--r--dev-lang/ghc/ghc-7.0.4.ebuild3
3 files changed, 38 insertions, 2 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog
index 9ba3c216fc70..ac75d80da78b 100644
--- a/dev-lang/ghc/ChangeLog
+++ b/dev-lang/ghc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-lang/ghc
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.208 2011/08/23 17:40:45 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.209 2011/08/23 18:08:05 slyfox Exp $
+
+ 23 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> ghc-7.0.4.ebuild,
+ +files/ghc-7.0.4-nxstack.patch:
+ QA: Fixed executable stack in AdjustorAsm.o
23 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> ghc-7.0.4.ebuild:
Once again USE=unicode for ncurses is a required depend (bug #380241 by
diff --git a/dev-lang/ghc/files/ghc-7.0.4-nxstack.patch b/dev-lang/ghc/files/ghc-7.0.4-nxstack.patch
new file mode 100644
index 000000000000..791e8defb90a
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.0.4-nxstack.patch
@@ -0,0 +1,31 @@
+From 25bf3687361501e711d50a8038f0f8de4a2d2aa3 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 10 Aug 2011 11:01:26 +0300
+Subject: [PATCH] Mark stack of 'rts/AdjustorAsm.S' as nonexecutable on linux
+
+Gentoo's scanelf program found executable stack in many resulting binaries:
+* RWX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/ghc
+* !WX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/libHSrts.a:AdjustorAsm.o
+
+More info can be found here: http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ rts/AdjustorAsm.S | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/rts/AdjustorAsm.S b/rts/AdjustorAsm.S
+index 75b83f6..8045bfe 100644
+--- a/rts/AdjustorAsm.S
++++ b/rts/AdjustorAsm.S
+@@ -192,3 +192,7 @@ adjustorCode:
+ ret
+ #endif
+
++/* mark stack as nonexecutable */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",@progbits
++#endif
+--
+1.7.3.4
+
diff --git a/dev-lang/ghc/ghc-7.0.4.ebuild b/dev-lang/ghc/ghc-7.0.4.ebuild
index 48a7dfe4af0c..601dc1cdf4ad 100644
--- a/dev-lang/ghc/ghc-7.0.4.ebuild
+++ b/dev-lang/ghc/ghc-7.0.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-7.0.4.ebuild,v 1.2 2011/08/23 17:40:45 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-7.0.4.ebuild,v 1.3 2011/08/23 18:08:05 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -363,6 +363,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
+ epatch "${FILESDIR}"/${PN}-7.0.4-nxstack.patch
if use prefix; then
# Make configure find docbook-xsl-stylesheets from Prefix