--- ghc-6.2.1-r1.ebuild.orig 2004-08-07 09:14:53.000000000 -0700 +++ ghc-6.2.1-r1.ebuild 2004-08-07 20:42:33.000000000 -0700 @@ -74,7 +74,14 @@ # 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 use ppc + then + bzcat ${FILESDIR}/ghc-6.2.hardened-ppc.patch.bz2 | patch -p1 + else + 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 +98,14 @@ # (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 + if use ppc; + then + echo "SRC_CC_OPTS+=-fno-pic" >> mk/build.mk + echo "SRC_HC_OPTS+=-optc-fno-pic" >> mk/build.mk + else + 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 + fi # force the config variable ArSupportsInput to be unset; # ar in binutils >= 2.14.90.0.8-r1 seems to be classified