diff options
author | Andres Loeh <kosmikus@gentoo.org> | 2004-10-26 13:50:12 +0000 |
---|---|---|
committer | Andres Loeh <kosmikus@gentoo.org> | 2004-10-26 13:50:12 +0000 |
commit | 7bd77b9dc881d7f8371d8185ae26731da7f07b04 (patch) | |
tree | a066de7c99c5b85312521c0846528dfd6c29356c /dev-lang | |
parent | Use tc-getCC() - bug #68987 (Manifest recommit) (diff) | |
download | gentoo-2-7bd77b9dc881d7f8371d8185ae26731da7f07b04.tar.gz gentoo-2-7bd77b9dc881d7f8371d8185ae26731da7f07b04.tar.bz2 gentoo-2-7bd77b9dc881d7f8371d8185ae26731da7f07b04.zip |
Modified CFLAG testing code, following discussion in bug #59709.
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ghc/ChangeLog | 5 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.2.2.ebuild | 23 |
2 files changed, 14 insertions, 14 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog index c71ef24c84cb..deb5e3ccf678 100644 --- a/dev-lang/ghc/ChangeLog +++ b/dev-lang/ghc/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-lang/ghc # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.44 2004/10/23 23:14:49 mattam Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.45 2004/10/26 13:50:12 kosmikus Exp $ + + 26 Oct 2004; Andres Loeh <kosmikus@gentoo.org> ghc-6.2.2.ebuild: + Modified CFLAG testing code, following discussion in bug #59709. 24 Oct 2004; Matthieu Sozeau <mattam@gentoo.org> ghc-6.2.2.ebuild: Tested on ppc. diff --git a/dev-lang/ghc/ghc-6.2.2.ebuild b/dev-lang/ghc/ghc-6.2.2.ebuild index aad6ea2850bd..f156155b51bc 100644 --- a/dev-lang/ghc/ghc-6.2.2.ebuild +++ b/dev-lang/ghc/ghc-6.2.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.2.2.ebuild,v 1.2 2004/10/23 23:14:49 mattam Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.2.2.ebuild,v 1.3 2004/10/26 13:50:12 kosmikus Exp $ # Brief explanation of the bootstrap logic: # @@ -61,20 +61,16 @@ GHCPATH="${PATH}:/opt/ghc/bin" SUPPORTED_CFLAGS="" # Setup supported CFLAGS. -setup_cflag() { +check_cflags() { OLD_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} $1" + CFLAGS="$1" strip-unsupported-flags - - if [ "${OLD_CFLAGS}" != "${CFLAGS}" ]; - then - SUPPORTED_CFLAGS="$1 ${SUPPORTED_CFLAGS}" - fi + SUPPORTED_CFLAGS="${SUPPORTED_CFLAGS} ${CFLAGS}" + CFLAGS="${OLD_CFLAGS}" } setup_cflags() { - setup_cflag "-fno-pic" - setup_cflag "-fno-stack-protector" + check_cflags "-nopie -fno-stack-protector -fno-stack-protector-all" } src_unpack() { @@ -86,9 +82,10 @@ src_unpack() { cd ${S}/ghc pushd driver setup_cflags + epatch ${FILESDIR}/${PN}-6.2.hardened.patch - sed -i -e "s|@GHC_CFLAGS@|${SUPPORTED_CFLAGS//-f/-optc-f}|" ghc/ghc.sh - sed -i -e "s|@GHC_CFLAGS@|${SUPPORTED_CFLAGS//-f/-optc-f}|" ghci/ghci.sh + sed -i -e "s|@GHC_CFLAGS@|${SUPPORTED_CFLAGS// -/ -optc-}|" ghc/ghc.sh + sed -i -e "s|@GHC_CFLAGS@|${SUPPORTED_CFLAGS// -/ -optc-}|" ghci/ghci.sh popd } @@ -105,7 +102,7 @@ src_compile() { # patch included) setup_cflags echo "SRC_CC_OPTS+=${SUPPORTED_CFLAGS}" >> mk/build.mk - echo "SRC_HC_OPTS+=${SUPPORTED_CFLAGS//-f/-optc-f}" >> mk/build.mk + echo "SRC_HC_OPTS+=${SUPPORTED_CFLAGS// -/ -optc-}" >> mk/build.mk # force the config variable ArSupportsInput to be unset; # ar in binutils >= 2.14.90.0.8-r1 seems to be classified |