Index: ghc-6.2.1-r1.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.2.1-r1.ebuild,v retrieving revision 1.3 diff -u -r1.3 ghc-6.2.1-r1.ebuild --- ghc-6.2.1-r1.ebuild 2 Jul 2004 04:26:21 -0000 1.3 +++ ghc-6.2.1-r1.ebuild 25 Sep 2004 11:28:21 -0000 @@ -23,7 +23,7 @@ #There is only one issue: ghci will be successfully built only if ghc is bootstrapped from the same version. #Thus we need to detect presently installed one and bootstrap in one or two stages.. -inherit base +inherit base flag-o-matic IUSE="doc tetex opengl" @@ -73,8 +73,11 @@ # hardened-gcc needs to be disabled, because the # mangler doesn't accept its output; yes, the 6.2 version # should do ... - cd ${S} - bzcat ${FILESDIR}/ghc-6.2.hardened.patch.bz2 | patch -p1 + if has_spp; then + cd ${S} + bzcat ${FILESDIR}/ghc-6.2.hardened.patch.bz2 | patch -p1 + fi + pushd ghc/compiler/ghci bzcat ${FILESDIR}/ghc-6.2.1-linker.patch.bz2 | patch -p0 popd @@ -91,8 +94,17 @@ # (this is still necessary, even though we have the patch, because # we might be bootstrapping from a version that didn't have the # patch included) - echo "SRC_CC_OPTS+=-fno-pic -fno-stack-protector" >> mk/build.mk - echo "SRC_HC_OPTS+=-optc-fno-pic -optc-fno-stack-protector" >> mk/build.mk + opts="" + if has_pic; then + opts="-fno-pic" + fi + + if has_ssp; then + opts="-fno-stack-protector ${opts}" + fi + + echo "SRC_CC_OPTS+=${opts}" >> mk/build.mk + echo "SRC_HC_OPTS+=${opts//-f/-optc-f}" >> mk/build.mk # force the config variable ArSupportsInput to be unset; # ar in binutils >= 2.14.90.0.8-r1 seems to be classified