diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-09-16 06:50:29 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-09-16 06:50:29 +0000 |
commit | a04d702c3c9433fc114a292e198e20b40de65b75 (patch) | |
tree | 688b93035f7f0454bf436b3a62d4babab702ecba /dev-lang | |
parent | Remove 4.3.1 (not -r1) due to unsolvable deps on some arches. (diff) | |
download | gentoo-2-a04d702c3c9433fc114a292e198e20b40de65b75.tar.gz gentoo-2-a04d702c3c9433fc114a292e198e20b40de65b75.tar.bz2 gentoo-2-a04d702c3c9433fc114a292e198e20b40de65b75.zip |
Add <haddock-2 blocker to ghc-6.10.4, add ppc64 binaries and patches to ghc 6.10.4.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ghc/ChangeLog | 12 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-6.10.4-ppc64-always-minimal-toc.patch | 9 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch | 37 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.10.4.ebuild | 35 |
4 files changed, 75 insertions, 18 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog index 09259872db5d..8b462799dcd2 100644 --- a/dev-lang/ghc/ChangeLog +++ b/dev-lang/ghc/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for dev-lang/ghc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.169 2009/09/10 09:01:21 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.170 2009/09/16 06:50:28 kolmodin Exp $ + + 16 Sep 2009; Lennart Kolmodin <kolmodin@gentoo.org> ghc-6.10.4.ebuild, + +files/ghc-6.10.4-ppc64-always-minimal-toc.patch, + +files/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch: + Add blocker on <haddock-2.4.2. Older versions will not work with this + version of ghc. We add the block in ghc rather than in haddock, as blocks + can't be trusted to be retroactive. + + Also add ppc64 binary and patches, + work done by Sergei Trofimovich <slyfox@community.haskell.org>. 10 Sep 2009; Christian Faulhammer <fauli@gentoo.org> ghc-6.8.2-r1.ebuild: stable x86/amd64, bug 283155 diff --git a/dev-lang/ghc/files/ghc-6.10.4-ppc64-always-minimal-toc.patch b/dev-lang/ghc/files/ghc-6.10.4-ppc64-always-minimal-toc.patch new file mode 100644 index 000000000000..8aaf594ee0f9 --- /dev/null +++ b/dev-lang/ghc/files/ghc-6.10.4-ppc64-always-minimal-toc.patch @@ -0,0 +1,9 @@ +diff --git a/ghc/ghc.wrapper b/ghc/ghc.wrapper +index 71eae84..b02421d 100644 +--- a/ghc/ghc.wrapper ++++ b/ghc/ghc.wrapper +@@ -1,3 +1,3 @@ + #!/bin/sh + +-exec $executablename -B$datadir -dynload wrapped ${1+"$@"} ++exec $executablename -B$datadir -optc-mminimal-toc -dynload wrapped ${1+"$@"} diff --git a/dev-lang/ghc/files/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch b/dev-lang/ghc/files/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch new file mode 100644 index 000000000000..396c07974d1f --- /dev/null +++ b/dev-lang/ghc/files/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch @@ -0,0 +1,37 @@ +diff --git a/libraries/Makefile b/libraries/Makefile +index bf59e9a..c85df45 100644 +--- a/libraries/Makefile ++++ b/libraries/Makefile +@@ -128,7 +128,7 @@ ifeq "$(ghc_ge_605)" "NO" + CABAL_GHC_FLAGS += -cpp + endif + +-BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=$(CABAL_VERSION) -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath -i$(HERE_ABS)/hpc ++BOOTSTRAPPING_FLAGS = $(SRC_HC_OPTS) $(CABAL_GHC_FLAGS) -DCABAL_VERSION=$(CABAL_VERSION) -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath -i$(HERE_ABS)/hpc + + .PHONY: boot + +@@ -141,19 +141,19 @@ cabal-bin: cabal-bin.hs + bootstrapping.conf: cabal-bin + echo "[]" > $@.tmp + -cd extensible-exceptions && $(CABAL) clean --distpref=dist-bootstrapping +- cd extensible-exceptions && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp ++ cd extensible-exceptions && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --ghc-options="$(BOOTSTRAPPING_FLAGS)" --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp + cd extensible-exceptions && $(CABAL) build --distpref=dist-bootstrapping + cd extensible-exceptions && $(CABAL) install --distpref=dist-bootstrapping --inplace + -cd filepath && $(CABAL) clean --distpref=dist-bootstrapping +- cd filepath && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp ++ cd filepath && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --ghc-options="$(BOOTSTRAPPING_FLAGS)" --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp + cd filepath && $(CABAL) build --distpref=dist-bootstrapping + cd filepath && $(CABAL) install --distpref=dist-bootstrapping --inplace + -cd Cabal && $(CABAL) clean --distpref=dist-bootstrapping +- cd Cabal && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp ++ cd Cabal && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --ghc-options="$(BOOTSTRAPPING_FLAGS)" --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp + cd Cabal && $(CABAL) build --distpref=dist-bootstrapping + cd Cabal && $(CABAL) install --distpref=dist-bootstrapping --inplace + -cd hpc && $(CABAL) clean --distpref=dist-bootstrapping +- cd hpc && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp ++ cd hpc && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --ghc-options="$(BOOTSTRAPPING_FLAGS)" --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp + cd hpc && $(CABAL) build --distpref=dist-bootstrapping + cd hpc && $(CABAL) install --distpref=dist-bootstrapping --inplace + mv $@.tmp $@ diff --git a/dev-lang/ghc/ghc-6.10.4.ebuild b/dev-lang/ghc/ghc-6.10.4.ebuild index 805c35142287..6044da439881 100644 --- a/dev-lang/ghc/ghc-6.10.4.ebuild +++ b/dev-lang/ghc/ghc-6.10.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 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.ebuild,v 1.3 2009/08/02 10:23:12 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.4.ebuild,v 1.4 2009/09/16 06:50:28 kolmodin Exp $ # Brief explanation of the bootstrap logic: # @@ -43,6 +43,7 @@ arch_binaries="" arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~ivanm/ghc-bin-${PV}-x86.tbz2 )" arch_binaries="$arch_binaries amd64? ( http://haskell.org/~kolmodin/ghc-bin-${PV}-amd64.tbz2 )" arch_binaries="$arch_binaries sparc? ( http://haskell.org/~duncan/ghc/ghc-bin-${PV}-sparc.tbz2 )" +arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )" #arch_binaries="$arch_binaries alpha? ( mirror://gentoo/ghc-bin-${PV}-alpha.tbz2 )" #arch_binaries="$arch_binaries amd64? ( mirror://gentoo/ghc-bin-${PV}-amd64.tbz2 )" @@ -56,7 +57,7 @@ SRC_URI="!binary? ( http://haskell.org/ghc/dist/${EXTRA_SRC_URI}/${P}-src.tar.bz LICENSE="BSD" SLOT="0" -KEYWORDS="~amd64 ~sparc ~x86" +KEYWORDS="~amd64 ~sparc ~ppc64 ~x86" IUSE="binary doc ghcbootstrap" RDEPEND=" @@ -64,7 +65,9 @@ RDEPEND=" >=sys-devel/gcc-2.95.3 >=sys-devel/binutils-2.17 >=dev-lang/perl-5.6.1 - >=dev-libs/gmp-4.1" + >=dev-libs/gmp-4.1 + !<dev-haskell/haddock-2.4.2" +# earlier versions than 2.4.2 of haddock only works with older ghc releases DEPEND="${RDEPEND} ghcbootstrap? ( doc? ( ~app-text/docbook-xml-dtd-4.2 @@ -124,6 +127,10 @@ ghc_setup_cflags() { gcc-specs-pie && append-ghc-cflags compile link -nopie gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector + # prevent from failind building unregisterised ghc: + # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html + use ppc64 && append-ghc-cflags compile -mminimal-toc + # We also add -Wa,--noexecstack to get ghc to generate .o files with # non-exectable stack. This it a hack until ghc does it itself properly. append-ghc-cflags assemble "-Wa,--noexecstack" @@ -169,6 +176,13 @@ src_unpack() { sed -i -e 's/DO_NOT_INSTALL =/DO_NOT_INSTALL = haddock/' \ "${S}/utils/Makefile" + # Highly useful when you need to pass your HC opts to bootstrap libs + # Currently it is needed for ppc64 to build with broken compiler + epatch "${FILESDIR}/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch" + + # see ghc_setup_cflags() + use ppc64 && epatch "${FILESDIR}/ghc-6.10.4-ppc64-always-minimal-toc.patch" + # as we have changed the build system with the readline patch eautoreconf fi @@ -188,20 +202,6 @@ src_compile() { echo "SRC_HC_OPTS+=${GHC_CFLAGS}" >> mk/build.mk echo "SRC_CC_OPTS+=${CFLAGS} -Wa,--noexecstack" >> mk/build.mk - # The settings that give you the fastest complete GHC build are these: - if use ghcquickbuild; then - echo "SRC_HC_OPTS = -H64m -Onot -fasm" >> mk/build.mk - echo "GhcStage1HcOpts = -O -fasm" >> mk/build.mk - echo "GhcStage2HcOpts = -Onot -fasm" >> mk/build.mk - echo "GhcLibHcOpts = -Onot -fasm" >> mk/build.mk - echo "GhcLibWays =" >> mk/build.mk - echo "SplitObjs = NO" >> mk/build.mk - fi - # However, note that the libraries are built without optimisation, so - # this build isn't very useful. The resulting compiler will be very - # slow. On a 4-core x86 machine using MAKEOPTS="-j10", this build was - # timed at less than 8 minutes. - # We can't depend on haddock except when bootstrapping when we # must build docs and include them into the binary .tbz2 package if use ghcbootstrap && use doc; then @@ -219,6 +219,7 @@ src_compile() { # GHC build system knows to build unregisterised on alpha and hppa, # but we have to tell it to build unregisterised on some arches + # ppc64: EvilMangler currently does not understand some TOCs if use alpha || use hppa || use ppc64; then echo "GhcUnregisterised=YES" >> mk/build.mk echo "GhcWithInterpreter=NO" >> mk/build.mk |