summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2010-07-14 09:02:35 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2010-07-14 09:02:35 +0000
commitadbca15cce5ddbc6c3c64f713c092172f3ff3d4e (patch)
tree1525efee38f77b301e3f0ba6941c8c1137847f64 /dev-lang
parentStable on amd64 wrt bug #328071 (diff)
downloadgentoo-2-adbca15cce5ddbc6c3c64f713c092172f3ff3d4e.tar.gz
gentoo-2-adbca15cce5ddbc6c3c64f713c092172f3ff3d4e.tar.bz2
gentoo-2-adbca15cce5ddbc6c3c64f713c092172f3ff3d4e.zip
Added ability to bootstrap ghc on systems with gmp-5
To understand why it is supposed to work, please, read comments in dev-lang/ghc/files/ghc-apply-gmp-hack (Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ghc/ChangeLog9
-rw-r--r--dev-lang/ghc/files/ghc-apply-gmp-hack61
-rw-r--r--dev-lang/ghc/ghc-6.10.4-r1.ebuild8
-rw-r--r--dev-lang/ghc/ghc-6.12.1.ebuild12
-rw-r--r--dev-lang/ghc/ghc-6.12.3.ebuild8
-rw-r--r--dev-lang/ghc/ghc-6.2.2.ebuild8
-rw-r--r--dev-lang/ghc/ghc-6.4.2.ebuild6
-rw-r--r--dev-lang/ghc/ghc-6.6.1.ebuild6
-rw-r--r--dev-lang/ghc/ghc-6.6.ebuild6
-rw-r--r--dev-lang/ghc/ghc-6.8.2-r1.ebuild6
-rw-r--r--dev-lang/ghc/ghc-6.8.2.ebuild6
11 files changed, 111 insertions, 25 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog
index 556a0e1d0c65..307fd60a647b 100644
--- a/dev-lang/ghc/ChangeLog
+++ b/dev-lang/ghc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/ghc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.183 2010/07/10 17:59:16 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.184 2010/07/14 09:02:35 slyfox Exp $
+
+ 14 Jul 2010; Sergei Trofimovich <slyfox@gentoo.org> ghc-6.2.2.ebuild,
+ ghc-6.4.2.ebuild, ghc-6.6.ebuild, ghc-6.6.1.ebuild, ghc-6.8.2.ebuild,
+ ghc-6.8.2-r1.ebuild, ghc-6.10.4-r1.ebuild, ghc-6.12.1.ebuild,
+ ghc-6.12.3.ebuild, +files/ghc-apply-gmp-hack:
+ Added ability to bootstrap ghc on systems with gmp-5. Thanks to David
+ Brown (davidbCaf at freenode://#gentoo-haskell) for the report.
10 Jul 2010; Sergei Trofimovich <slyfox@gentoo.org> ghc-6.12.3.ebuild,
+files/ghc-6.12.3-ia64-use-libffi-for-foreign-import-wrapper.patch:
diff --git a/dev-lang/ghc/files/ghc-apply-gmp-hack b/dev-lang/ghc/files/ghc-apply-gmp-hack
new file mode 100644
index 000000000000..a0b4ab8ffd9c
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-apply-gmp-hack
@@ -0,0 +1,61 @@
+# this script is expected to be sourced by ghc ebuilds built against libgmp.so.3 library
+#
+# > source "${FILESDIR}/ghc-apply-gmp-hack"
+#
+# What it does and why it works:
+# > GMP 5.0 is upwardly source and binary compatible with 4.x, and 3.x versions,
+# > except for applications that use the semi-documented mpn_bdivmod function.
+#
+# > The solib numbers now reflect the removal of the documented but preliminary
+# > mpn_bdivmod function; we correctly flag incompatibility with GMP 4.3.
+# > GMP 5.0.0 has this wrong, and should perhaps be uninstalled to avoid confusion.
+#
+# taken from http://gmplib.org/gmp5.0.html
+#
+# Luckily, ghc does not use the 'mpn_bdivmod' function, so we can easily use
+# libgmp.so.10 for binaries which require libgmp.so.3
+#
+# So, this script checks whether this system has libgmp.so.10 and if has
+# shows it to bootstrapper-compiler via populating LD_LIBRARY_PATH
+# (it actually exports function doing this)
+#
+# After bootstrapping resulting compiler will not depend on old libgmp
+# Newer ghc binaries must be built against newer gmp
+#
+# Blames should be directed to Sergei Trofimovich <slyfox@gentoo.org>
+
+# should be used:
+# > inherit multilib
+# > ...
+# > # somewhere in src_unpack() { # as early as possible, right after unpacking source/binary
+# > source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
+local libdir_name=$1
+# let's see if we are in affected system
+if has_version '>=dev-libs/gmp-5.0.1'; then
+ local libgmpso3=$ROOT/usr/$libdir_name/libgmp.so.3
+ local libgmpso10=$ROOT/usr/$libdir_name/libgmp.so.10
+
+ # bother user only if things won't work for him
+ if [[ ! -e "$libgmpso3" ]]; then
+ if use binary; then
+ eerror "You have requested precompiled binary installation, which is"
+ eerror "built against 'libgmp.so.3'. You can create compatibility symlink"
+ eerror "if you have '$libgmpso10' and wish to use installed binary:"
+ eerror " # ln -s libgmp.so.10 '$libgmpso3'"
+ die "libgmp.so.3 not found"
+ else
+ if [[ -e "$libgmpso10" ]]; then
+ local fake_solib_dir=${S}/fake_solibs
+ mkdir "$fake_solib_dir" || die "failed to make fake lib dir"
+ elog "Enabling libgmp hack:"
+ elog "| Making symlink: '$fake_solib_dir/libgmp.so.3' -> '$libgmpso10'"
+ ln -s "$libgmpso10" "$fake_solib_dir/libgmp.so.3" || die "failed to make fake symlink"
+ export LD_LIBRARY_PATH=$fake_solib_dir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+ elog "| setting new LD_LIBRARY_PATH='$LD_LIBRARY_PATH'"
+ else
+ eerror "'$libgmpso3' and '$libgmpso10' are not found. Please, report the breakage."
+ fi
+ fi
+ fi
+fi
diff --git a/dev-lang/ghc/ghc-6.10.4-r1.ebuild b/dev-lang/ghc/ghc-6.10.4-r1.ebuild
index 18f03a040e1b..ff52e3105626 100644
--- a/dev-lang/ghc/ghc-6.10.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-6.10.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 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-r1.ebuild,v 1.7 2010/07/09 15:03:24 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.4-r1.ebuild,v 1.8 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base autotools bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -148,6 +148,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if ! use ghcbootstrap; then
@@ -242,7 +244,7 @@ src_compile() {
# we have to tell it to build unregisterised on some arches
# ppc64: EvilMangler currently does not understand some TOCs
# ia64: EvilMangler bitrot
- if use alpha || use hppa || use ia64 || use ppc64; then
+ if use alpha || use ia64 || use ppc64; then
echo "GhcUnregisterised=YES" >> mk/build.mk
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
echo "SplitObjs=NO" >> mk/build.mk
diff --git a/dev-lang/ghc/ghc-6.12.1.ebuild b/dev-lang/ghc/ghc-6.12.1.ebuild
index 9629e3d8b706..2a86404dd3c5 100644
--- a/dev-lang/ghc/ghc-6.12.1.ebuild
+++ b/dev-lang/ghc/ghc-6.12.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.1.ebuild,v 1.4 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.1.ebuild,v 1.5 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base autotools bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -40,11 +40,11 @@ EXTRA_SRC_URI="${PV}"
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 ppc? ( mirror://gentoo/ghc-bin-${PV}-ppc.tbz2 )"
arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( mirror://gentoo/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://haskell.org/~duncan/ghc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~ivanm/ghc-bin-${PV}-x86.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 )"
@@ -152,6 +152,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then
diff --git a/dev-lang/ghc/ghc-6.12.3.ebuild b/dev-lang/ghc/ghc-6.12.3.ebuild
index cde9d5cd0e25..401d561f6668 100644
--- a/dev-lang/ghc/ghc-6.12.3.ebuild
+++ b/dev-lang/ghc/ghc-6.12.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.3.ebuild,v 1.6 2010/07/10 17:59:16 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.3.ebuild,v 1.7 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base autotools bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -141,6 +141,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if ! use ghcbootstrap; then
@@ -256,7 +258,7 @@ src_compile() {
# we have to tell it to build unregisterised on some arches
# ppc64: EvilMangler currently does not understand some TOCs
# ia64: EvilMangler bitrot
- if use alpha || use hppa || use ia64 || use ppc64; then
+ if use alpha || use ia64 || use ppc64; then
echo "GhcUnregisterised=YES" >> mk/build.mk
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
echo "SplitObjs=NO" >> mk/build.mk
diff --git a/dev-lang/ghc/ghc-6.2.2.ebuild b/dev-lang/ghc/ghc-6.2.2.ebuild
index f228fe2ad0f6..249f4a167c3d 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-2008 Gentoo Foundation
+# Copyright 1999-2010 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.27 2008/01/26 19:53:25 dcoutts Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.2.2.ebuild,v 1.28 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -25,7 +25,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base eutils flag-o-matic toolchain-funcs ghc-package
+inherit base eutils flag-o-matic multilib toolchain-funcs ghc-package
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -149,6 +149,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then
diff --git a/dev-lang/ghc/ghc-6.4.2.ebuild b/dev-lang/ghc/ghc-6.4.2.ebuild
index 05dc7f4a1062..bae0d5a2929a 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-2010 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.28 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.4.2.ebuild,v 1.29 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -25,7 +25,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base eutils flag-o-matic toolchain-funcs autotools ghc-package
+inherit base eutils flag-o-matic multilib toolchain-funcs autotools ghc-package
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -172,6 +172,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then
diff --git a/dev-lang/ghc/ghc-6.6.1.ebuild b/dev-lang/ghc/ghc-6.6.1.ebuild
index 4873ccd573d4..2a6d3bababb0 100644
--- a/dev-lang/ghc/ghc-6.6.1.ebuild
+++ b/dev-lang/ghc/ghc-6.6.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.6.1.ebuild,v 1.19 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.6.1.ebuild,v 1.20 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -25,7 +25,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -159,6 +159,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then
diff --git a/dev-lang/ghc/ghc-6.6.ebuild b/dev-lang/ghc/ghc-6.6.ebuild
index 64a370ccbee5..605282b5a81b 100644
--- a/dev-lang/ghc/ghc-6.6.ebuild
+++ b/dev-lang/ghc/ghc-6.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.6.ebuild,v 1.16 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.6.ebuild,v 1.17 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -25,7 +25,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -142,6 +142,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then
diff --git a/dev-lang/ghc/ghc-6.8.2-r1.ebuild b/dev-lang/ghc/ghc-6.8.2-r1.ebuild
index 69fd56cbf92c..d6f6bdbe92fe 100644
--- a/dev-lang/ghc/ghc-6.8.2-r1.ebuild
+++ b/dev-lang/ghc/ghc-6.8.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2-r1.ebuild,v 1.3 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2-r1.ebuild,v 1.4 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -137,6 +137,8 @@ pkg_setup() {
src_unpack() {
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
# Modify the ghc driver script to use GHC_CFLAGS
diff --git a/dev-lang/ghc/ghc-6.8.2.ebuild b/dev-lang/ghc/ghc-6.8.2.ebuild
index 71a5ec225eb2..a58693b4d276 100644
--- a/dev-lang/ghc/ghc-6.8.2.ebuild
+++ b/dev-lang/ghc/ghc-6.8.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2.ebuild,v 1.14 2010/07/01 20:27:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2.ebuild,v 1.15 2010/07/14 09:02:35 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -28,7 +28,7 @@
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.
-inherit base bash-completion eutils flag-o-matic toolchain-funcs ghc-package versionator
+inherit base bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -138,6 +138,8 @@ src_unpack() {
use binary && mkdir "${S}"
base_src_unpack
+ source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
+
ghc_setup_cflags
if use binary; then