diff options
author | Duncan Coutts <dcoutts@gentoo.org> | 2006-05-18 20:42:44 +0000 |
---|---|---|
committer | Duncan Coutts <dcoutts@gentoo.org> | 2006-05-18 20:42:44 +0000 |
commit | 1e080f04b4c43c36dad0ef9988d282ad034bf8b5 (patch) | |
tree | 8641e53d377da0be035e20ca6b4b74c9871f8f45 /dev-lang/ghc | |
parent | Security mask kurobox-sources; bug #112791. (diff) | |
download | historical-1e080f04b4c43c36dad0ef9988d282ad034bf8b5.tar.gz historical-1e080f04b4c43c36dad0ef9988d282ad034bf8b5.tar.bz2 historical-1e080f04b4c43c36dad0ef9988d282ad034bf8b5.zip |
Support gcc-4.x better at the expense of hardened gcc-3.x.
Package-Manager: portage-2.1_pre10-r5
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r-- | dev-lang/ghc/ChangeLog | 14 | ||||
-rw-r--r-- | dev-lang/ghc/Manifest | 34 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-6.4.2-sparc32plus.patch | 12 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.4.1-r3.ebuild | 61 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.4.2.ebuild | 27 |
5 files changed, 107 insertions, 41 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog index 84f252a5bfbe..8a68528a4bfc 100644 --- a/dev-lang/ghc/ChangeLog +++ b/dev-lang/ghc/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-lang/ghc # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.101 2006/05/12 15:44:52 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.102 2006/05/18 20:42:44 dcoutts Exp $ + + 18 May 2006; Duncan Coutts <dcoutts@gentoo.org> + +files/ghc-6.4.2-sparc32plus.patch, ghc-6.4.1-r3.ebuild, ghc-6.4.2.ebuild: + Support gcc-4.x better at the expense of hardened gcc-3.x. + Switching between gcc-3.x and gcc-4.x will now just work. Switching between + vanilla and hardened gcc will now require re-emerging rather than just + working. It should also enable anyone who has broken their ghc installation + by upgrading to gcc-4.x to get things working again by re-emerging ghc-6.4.2, + ghc-6.4.1-r3 or ghc-bin-6.4.1-r1. + Only build OpenAL/ALUT bindings if the OpenGL bindings will also be built + (since one depends on the other). + Fix GHCi on sparc when using the V8+ ABI (eg CFLAGS="-march=ultrasparc"). 12 May 2006; Duncan Coutts <dcoutts@gentoo.org> +files/ghc-6.4.2-alut.patch, ghc-6.4.2.ebuild: diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest index 8343fef3866f..07575af3261d 100644 --- a/dev-lang/ghc/Manifest +++ b/dev-lang/ghc/Manifest @@ -21,6 +21,10 @@ AUX ghc-6.4.1-openal.patch 1270 RMD160 fa7b57dc78cc36c9d74e55bc4873e6efc321f353 MD5 f55d9cead45de0979d9650dccde5e168 files/ghc-6.4.1-openal.patch 1270 RMD160 fa7b57dc78cc36c9d74e55bc4873e6efc321f353 files/ghc-6.4.1-openal.patch 1270 SHA256 fe6db1cf73571bca4af195321112985201e695cf67ed889cf626e5dc2b54b67e files/ghc-6.4.1-openal.patch 1270 +AUX ghc-6.4.2-sparc32plus.patch 526 RMD160 970d062362284659c2570394c8f9328d8096ea8e SHA1 40d25c25a3cd6a228f3757b8e298fd8c72710544 SHA256 a05bd16c9308ec9f608aeabe0ea35e2dff6826f262108d1ccb16c4f93a2d3a44 size 526 +MD5 bb39f157030944685ae41d24622a2cb3 files/ghc-6.4.2-sparc32plus.patch 526 +RMD160 970d062362284659c2570394c8f9328d8096ea8e files/ghc-6.4.2-sparc32plus.patch 526 +SHA256 a05bd16c9308ec9f608aeabe0ea35e2dff6826f262108d1ccb16c4f93a2d3a44 files/ghc-6.4.2-sparc32plus.patch 526 AUX ghc-updater 9045 RMD160 b044a26add18464b583702f3cac667521c5eb06f SHA1 f5ccd2bf9f78f895368a1ff64ceddd5703f1d13b SHA256 eafc2eb58a9c1ad0263fd498cad00f50b0d04860cd8e26aa201910f77d74efbe size 9045 MD5 e7ba0887c43fd8333a4d1bd92c184244 files/ghc-updater 9045 RMD160 b044a26add18464b583702f3cac667521c5eb06f files/ghc-updater 9045 @@ -38,18 +42,18 @@ EBUILD ghc-6.4.1-r2.ebuild 6681 RMD160 6495a287a2a99c9f7dc582a6e6d64ae882ca6554 MD5 d11fd9573adf5cb5f508e53bad0a51ae ghc-6.4.1-r2.ebuild 6681 RMD160 6495a287a2a99c9f7dc582a6e6d64ae882ca6554 ghc-6.4.1-r2.ebuild 6681 SHA256 de4b010d17f0af8ea47b3da368b34fc67417093bfbe92ad439be03c38ee022b4 ghc-6.4.1-r2.ebuild 6681 -EBUILD ghc-6.4.1-r3.ebuild 8280 RMD160 2bfbba2f8ca37e0a508d1825238f301aec2bdd48 SHA1 f13d0a58e6428197a41dc6cfbf7beca9f3f09e05 SHA256 3c6ec6cdc58a93284de150c1ca78791a8d0b8ca61613bcd96388336d03ed5268 size 8280 -MD5 a6786ac9e892f6cc9a6d578fbcec428b ghc-6.4.1-r3.ebuild 8280 -RMD160 2bfbba2f8ca37e0a508d1825238f301aec2bdd48 ghc-6.4.1-r3.ebuild 8280 -SHA256 3c6ec6cdc58a93284de150c1ca78791a8d0b8ca61613bcd96388336d03ed5268 ghc-6.4.1-r3.ebuild 8280 -EBUILD ghc-6.4.2.ebuild 9246 RMD160 fdc29d485da9a53ba5b63e29266cf27dd518ca91 SHA1 c612b3eb1a9fe9d206213ff046f6fe96401262c4 SHA256 f47224d3bc6d7ee17aa3fa0ebac5d61f24fbfe224c807730e485e8b27911ee4a size 9246 -MD5 d519ec4eda24ea1cf3a638b5282a99d7 ghc-6.4.2.ebuild 9246 -RMD160 fdc29d485da9a53ba5b63e29266cf27dd518ca91 ghc-6.4.2.ebuild 9246 -SHA256 f47224d3bc6d7ee17aa3fa0ebac5d61f24fbfe224c807730e485e8b27911ee4a ghc-6.4.2.ebuild 9246 -MISC ChangeLog 17639 RMD160 9eba010756a0aec49b9528287dc9229c412b452d SHA1 6b7e964007aeb39e4c9701c66c83787abfcbec06 SHA256 4d319f7ffcc30f81ea782c839f3dc4298044149405c4612813931a9de3a99345 size 17639 -MD5 66457759c117a4b7ab68db85b7ee23e1 ChangeLog 17639 -RMD160 9eba010756a0aec49b9528287dc9229c412b452d ChangeLog 17639 -SHA256 4d319f7ffcc30f81ea782c839f3dc4298044149405c4612813931a9de3a99345 ChangeLog 17639 +EBUILD ghc-6.4.1-r3.ebuild 9027 RMD160 671e63946ab1eba93f8009773e832762febfcea8 SHA1 2d1bab8eeaf268f9fd1d398f7c1447d6bbd57fae SHA256 a242a21eb893faf6f4779b9e134c4d380d8d890bdc6c76df672b609a9fb90163 size 9027 +MD5 b262837c7e5376d8eec183796b2b1cbc ghc-6.4.1-r3.ebuild 9027 +RMD160 671e63946ab1eba93f8009773e832762febfcea8 ghc-6.4.1-r3.ebuild 9027 +SHA256 a242a21eb893faf6f4779b9e134c4d380d8d890bdc6c76df672b609a9fb90163 ghc-6.4.1-r3.ebuild 9027 +EBUILD ghc-6.4.2.ebuild 9734 RMD160 7854bacef4128d9073afb2ff346315d35af82702 SHA1 84bb12462fbeb5fd5074bc334eaede9ef11ffb53 SHA256 8022e1a12fc342008a36077be7e3ff0de6bfe38210dbf141031590c17669550d size 9734 +MD5 a95cdd306c59a85c78920914d1cd595c ghc-6.4.2.ebuild 9734 +RMD160 7854bacef4128d9073afb2ff346315d35af82702 ghc-6.4.2.ebuild 9734 +SHA256 8022e1a12fc342008a36077be7e3ff0de6bfe38210dbf141031590c17669550d ghc-6.4.2.ebuild 9734 +MISC ChangeLog 18361 RMD160 9b1f5372efa8a849c5843579c25470e18d2f53bb SHA1 b9d94b55162f915377f919c347043b7f3f44b597 SHA256 02efcb4e8968f56e629a517bc4e0c5b2b2af29357b56b4d3fdd0628e52675b91 size 18361 +MD5 a057a31c7e6cd01b33a122cb9ed7e0c6 ChangeLog 18361 +RMD160 9b1f5372efa8a849c5843579c25470e18d2f53bb ChangeLog 18361 +SHA256 02efcb4e8968f56e629a517bc4e0c5b2b2af29357b56b4d3fdd0628e52675b91 ChangeLog 18361 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 size 223 MD5 c694674dcbef799cd4fdb6914683ebff metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 metadata.xml 223 @@ -69,7 +73,7 @@ SHA256 84f4b6adad832de57cc219499590df79b6be7ac5c96ec975e15aa37370269d40 files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) -iD8DBQFEZK1JnUVyUObPUL4RAi0yAJ9HQzrRaQ/TcS7pdvIBj8AiZzyM6gCcDIQV -baWoG5lW6IEVt+JGWlQIQf8= -=mc7H +iD8DBQFEbNwpnUVyUObPUL4RAqh5AJ9KQ/bmdct5PftPzSPKJYzGAepFFACfbAKh +oU9Km8WJZ4/cPLpsKNgimnQ= +=t0tv -----END PGP SIGNATURE----- diff --git a/dev-lang/ghc/files/ghc-6.4.2-sparc32plus.patch b/dev-lang/ghc/files/ghc-6.4.2-sparc32plus.patch new file mode 100644 index 000000000000..709f3db52b1d --- /dev/null +++ b/dev-lang/ghc/files/ghc-6.4.2-sparc32plus.patch @@ -0,0 +1,12 @@ +--- ghc-6.4.2/ghc/rts/Linker.c 2006-01-04 15:24:10.000000000 +0000 ++++ ghc-6.4.2.new/ghc/rts/Linker.c 2006-05-15 21:06:45.000000000 +0100 +@@ -2695,6 +2695,9 @@ + IF_DEBUG(linker,debugBelch( "Architecture is " )); + switch (ehdr->e_machine) { + case EM_386: IF_DEBUG(linker,debugBelch( "x86" )); break; ++#ifdef EM_SPARC32PLUS ++ case EM_SPARC32PLUS: ++#endif + case EM_SPARC: IF_DEBUG(linker,debugBelch( "sparc" )); break; + #ifdef EM_IA_64 + case EM_IA_64: IF_DEBUG(linker,debugBelch( "ia64" )); break; diff --git a/dev-lang/ghc/ghc-6.4.1-r3.ebuild b/dev-lang/ghc/ghc-6.4.1-r3.ebuild index f698a49a125c..2e67a4041cb5 100644 --- a/dev-lang/ghc/ghc-6.4.1-r3.ebuild +++ b/dev-lang/ghc/ghc-6.4.1-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.4.1-r3.ebuild,v 1.6 2006/05/03 23:05:28 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.4.1-r3.ebuild,v 1.7 2006/05/18 20:42:44 dcoutts Exp $ # Brief explanation of the bootstrap logic: # @@ -14,7 +14,7 @@ # can be removed once an forall after the first succesful install # of ghc. -inherit base eutils flag-o-matic autotools ghc-package check-reqs +inherit base eutils flag-o-matic toolchain-funcs autotools ghc-package check-reqs DESCRIPTION="The Glasgow Haskell Compiler" HOMEPAGE="http://www.haskell.org/ghc/" @@ -43,8 +43,9 @@ RDEPEND=" >=dev-libs/gmp-4.1 >=sys-libs/readline-4.2 X? ( || ( x11-libs/libX11 virtual/x11 ) ) - opengl? ( virtual/opengl virtual/glu virtual/glut ) - openal? ( media-libs/openal )" + opengl? ( virtual/opengl + virtual/glu virtual/glut + openal? ( media-libs/openal ) )" # ghc cannot usually be bootstrapped using later versions ... DEPEND="${RDEPEND} @@ -57,18 +58,24 @@ DEPEND="${RDEPEND} PDEPEND=">=dev-haskell/cabal-1.1.3" -# Portage's resolution of virtuals fails on virtual/ghc in some Portage releases, -# the following function causes the build to fail with an informative error message -# in such a case. -# pkg_setup() { -# if ! has_version virtual/ghc; then -# eerror "This ebuild needs a version of GHC to bootstrap from." -# eerror "Please emerge dev-lang/ghc-bin to get a binary version." -# eerror "You can either use the binary version directly or emerge" -# eerror "dev-lang/ghc afterwards." -# die "virtual/ghc version required to build" -# fi -# } +pkg_setup() { + if use openal && ! use opengl; then + ewarn "The OpenAL bindings require the OpenGL bindings, however" + ewarn "USE=\"-opengl\" so the OpenAL bindings will not be built." + ewarn "To build the OpenAL bindings emerge with USE=\"openal opengl\"" + fi + + # Portage's resolution of virtuals fails on virtual/ghc in some Portage + # releases, the following function causes the build to fail with an + # informative error message in such a case. + #if ! has_version virtual/ghc; then + # eerror "This ebuild needs a version of GHC to bootstrap from." + # eerror "Please emerge dev-lang/ghc-bin to get a binary version." + # eerror "You can either use the binary version directly or emerge" + # eerror "dev-lang/ghc afterwards." + # die "virtual/ghc version required to build" + #fi +} append-ghc-cflags() { local flag compile assemble link @@ -116,14 +123,23 @@ ghc_setup_cflags() { # hardened-gcc needs to be disabled, because the mangler doesn't accept # its output. - append-ghc-cflags compile link $(test-flags-CC -nopie) - append-ghc-cflags compile $(test-flags-CC -fno-stack-protector) + gcc-specs-pie && append-ghc-cflags compile link -nopie + gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector # 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" } +ghc_setup_wrapper() { + echo '#!/bin/sh' + echo "GHCBIN=\"$(ghc-libdir)/ghc-$1\";" + echo "TOPDIROPT=\"-B$(ghc-libdir)\";" + echo "GHC_CFLAGS=\"${GHC_CFLAGS}\";" + echo '# Mini-driver for GHC' + echo 'exec $GHCBIN $TOPDIROPT $GHC_CFLAGS ${1+"$@"}' +} + src_unpack() { base_src_unpack ghc_setup_cflags @@ -132,6 +148,7 @@ src_unpack() { epatch "${FILESDIR}/${PN}-6.4.1-configure.patch" epatch "${FILESDIR}/${PN}-6.4.1-openal.patch" epatch "${FILESDIR}/${PN}-6.4.1-gcc41.patch" + epatch "${FILESDIR}/${PN}-6.4.2-sparc32plus.patch" # Modify the ghc driver script to use GHC_CFLAGS echo "SCRIPT_SUBST_VARS += GHC_CFLAGS" >> "${S}/ghc/driver/ghc/Makefile" @@ -192,14 +209,20 @@ src_compile() { echo "SplitObjs=NO" >> mk/build.mk fi + GHC_CFLAGS="" ghc_setup_wrapper $(ghc-version) > "${TMP}/ghc.sh" + chmod +x "${TMP}/ghc.sh" + # we've patched some configure.ac files do allow us to enable/disable the # X11 and HGL packages, so we need to autoreconf. eautoreconf econf \ + --with-ghc="${TMP}/ghc.sh" \ $(use_enable opengl opengl) \ $(use_enable opengl glut) \ - $(use_enable openal openal) \ + $(use openal && use opengl \ + && echo --enable-openal \ + || echo --disable-openal) \ $(use_enable X x11) \ $(use_enable X hgl) \ || die "econf failed" diff --git a/dev-lang/ghc/ghc-6.4.2.ebuild b/dev-lang/ghc/ghc-6.4.2.ebuild index 1f7ef122588e..11409f80f24c 100644 --- a/dev-lang/ghc/ghc-6.4.2.ebuild +++ b/dev-lang/ghc/ghc-6.4.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.4.2.ebuild,v 1.4 2006/05/12 15:44:52 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.4.2.ebuild,v 1.5 2006/05/18 20:42:44 dcoutts Exp $ # Brief explanation of the bootstrap logic: # @@ -14,7 +14,7 @@ # can be removed once an forall after the first succesful install # of ghc. -inherit base eutils flag-o-matic autotools ghc-package check-reqs +inherit base eutils flag-o-matic toolchain-funcs autotools ghc-package check-reqs DESCRIPTION="The Glasgow Haskell Compiler" HOMEPAGE="http://www.haskell.org/ghc/" @@ -125,20 +125,30 @@ ghc_setup_cflags() { # hardened-gcc needs to be disabled, because the mangler doesn't accept # its output. - append-ghc-cflags compile link $(test-flags-CC -nopie) - append-ghc-cflags compile $(test-flags-CC -fno-stack-protector) + gcc-specs-pie && append-ghc-cflags compile link -nopie + gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector # 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" } +ghc_setup_wrapper() { + echo '#!/bin/sh' + echo "GHCBIN=\"$(ghc-libdir)/ghc-$1\";" + echo "TOPDIROPT=\"-B$(ghc-libdir)\";" + echo "GHC_CFLAGS=\"${GHC_CFLAGS}\";" + echo '# Mini-driver for GHC' + echo 'exec $GHCBIN $TOPDIROPT $GHC_CFLAGS ${1+"$@"}' +} + src_unpack() { base_src_unpack ghc_setup_cflags cd ${S} epatch "${WORKDIR}/${P}-alut.patch" + epatch "${FILESDIR}/${P}-sparc32plus.patch" # Modify the ghc driver script to use GHC_CFLAGS echo "SCRIPT_SUBST_VARS += GHC_CFLAGS" >> "${S}/ghc/driver/ghc/Makefile" @@ -202,15 +212,20 @@ src_compile() { echo "SplitObjs=NO" >> mk/build.mk fi + GHC_CFLAGS="" ghc_setup_wrapper $(ghc-version) > "${TMP}/ghc.sh" + chmod +x "${TMP}/ghc.sh" + # We've patched some configure.ac files to fix the OpenAL/ALUT bindings. # So we need to autoreconf. eautoreconf econf \ + --with-ghc="${TMP}/ghc.sh" \ $(use_enable opengl opengl) \ $(use_enable opengl glut) \ - $(use_enable openal openal) \ - $(use_enable openal alut) \ + $(use openal && use opengl \ + && echo --enable-openal --enable-alut \ + || echo --disable-openal --disable-alut) \ $(use_enable X x11) \ $(use_enable X hgl) \ || die "econf failed" |