Update to 6.6.1. With helpful hints from Don Stewart and espie@.

Thanks to all the testers and to steven@, who was so kind to
build the HC files for bootstrapping on amd64.
This commit is contained in:
kili 2007-07-21 17:14:57 +00:00
parent a6b0bb0585
commit 87a3f71582
25 changed files with 2779 additions and 1604 deletions

View File

@ -1,103 +1,27 @@
# $OpenBSD: Makefile,v 1.22 2006/11/26 11:38:07 espie Exp $
# $OpenBSD: Makefile,v 1.23 2007/07/21 17:14:57 kili Exp $
#
# Based on Simon Marlow's port script for FreeBSD:
# Ancient versions based on Simon Marlow's port script for FreeBSD:
# $FreeBSD: ports/lang/ghc/Makefile,v 1.13 2002/08/22 12:53:38 obraun Exp $
# And on NetBSD's 5.04.3 .hc boot script
ONLY_FOR_ARCHS= i386 amd64
# sparc
# The general solution for other architectures will be to boot
# via unregisterised .hc files generated on openbsd-*-i386. See:
#
# http://haskell.org/ghc/docs/latest/html/building/sec-porting-ghc.html
#
# The best bets are powerpc and alpha. sparc64, mips64 and amd64
# should work. hppa and mips have recently worked. m68k hasn't worked
# for a long time now, and on mac68k at least _ld_ dies with a malloc
# error when linking the ghc binary.
# The build process: we build a full GHC from C source. The C source
# needs to be generated once for each arch, for each version of GHC.
COMMENT-main= compiler for the functional language Haskell
COMMENT-doc= documentation for GHC
COMMENT-main= "compiler for the functional language Haskell"
COMMENT-doc= "documentation for the functional language Haskell"
DISTNAME= ghc-${MODGHC_VER}
PKGNAME-main= ghc-${MODGHC_VER}
PKGNAME-doc= ghc-doc-${MODGHC_VER}
CATEGORIES= lang
HOMEPAGE= http://www.haskell.org/ghc/
MAINTAINER= Matthias Kilian <kili@openbsd.org>
V= 6.2.2
# Pull in lang/ghc to get MODGHC_VER and ONLY_FOR_ARCHS, which is maintained
# in ghc.port.mk. lang/python needed for regress.
MODULES= lang/ghc lang/python
DISTNAME= ghc-${V}
PKGNAME-main= ghc-${V}p0
PKGNAME-doc= ghc-doc-${V}p0
CATEGORIES= lang
HOMEPAGE= http://www.haskell.org/ghc/
MAINTAINER= Don Stewart <dons@openbsd.org>
MULTI_PACKAGES= -doc -main
MULTI_PACKAGES= -doc -main
PKG_ARCH-doc= *
LIB_DEPENDS-main= gmp::devel/gmp
WANTLIB-main= c m ncurses readline
HASKELL= http://www.haskell.org
MASTER_SITES= ${HASKELL}/ghc/dist/${V}/
MASTER_SITES0= ${HASKELL}/ghc/docs/${V}/
MASTER_SITES1= ${HASKELL}/definition/
MASTER_SITES2= ftp://ftp.cse.unsw.edu.au/pub/users/dons/ghc/${V}/
DIST_SUBDIR= ghc-${V}
DOC_FILES= users_guide hslibs building libraries
DOC_FILES1= haskell98-report
DOC_DIR= ${PREFIX}/share/doc/ghc
DISTFILES= ghc-${V}-src.tar.bz2 \
${DOC_FILES:C/(.+)/\1.html.tar.gz:0/g} \
${DOC_FILES1:C/(.+)/\1-html.tar.gz:1/g} \
ghc-${V}-${ARCH}-unknown-openbsd-hc.tar.bz2:2 \
ghc-regress-${V}.tar.bz2:2
# this tarball is the first step in porting to a new architecture
SUPDISTFILES= ghc-${V}-i386-unknown-openbsd-hc.tar.bz2:2 \
ghc-${V}-amd64-unknown-openbsd-hc.tar.bz2:2
# ghc-${V}-sparc-unknown-openbsd-hc.tar.bz2:2
# datasize around 130M on amd64
VMEM_WARNING= Yes
USE_GMAKE= Yes
CONFIGURE_STYLE=gnu dest
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}"
# global register variable bug in gcc 3.3.2 screws up amd64. need gcc 3.4
# we bypass it by ignoring all platform dependent tweaks. 2x slowdown.
.if ${MACHINE_ARCH} == "amd64"
CONFIGURE_ARGS+=--enable-hc-boot-unregisterised
.endif
# distrib/hc-build is a wrapper around configure and the
# bootstrap make, with magic flags, vars and control flow
do-configure:
: nothing here
do-build:
@(cd ${WRKSRC} ;\
${CONFIGURE_ENV} distrib/hc-build ${CONFIGURE_ARGS})
# note: ghci not in PLIST since it doesnt work yet
FAKE_FLAGS+="stage=2"
post-install:
${INSTALL_DATA_DIR} ${DOC_DIR}
.for i in ${DOC_FILES:C/(.+)/\1.html.tar.gz/g} \
${DOC_FILES1:C/(.+)/\1-html.tar.gz/g}
@tar zxf ${FULLDISTDIR}/${i} -C ${DOC_DIR}
.endfor
REGRESS_DEPENDS=::lang/python/2.3
REGRESS_RESULT= ${WRKSRC}/actual.result
REGRESS_FLAGS= TEST_HC="${WRKSRC}/ghc/compiler/stage2/ghc-inplace"
REGRESS_FLAGS+= EXTRA_RUNTEST_OPTS="--output-summary=${REGRESS_RESULT}" \
PYTHON="${LOCALBASE}/bin/python2.3"
PSEUDO_FLAVORS= native_bootstrap
FLAVOR?=
# BSD w/o advertising clause
PERMIT_PACKAGE_CDROM= Yes
@ -105,4 +29,135 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PKG_ARCH-doc= *
LIB_DEPENDS-main= gmp::devel/gmp
RUN_DEPENDS-doc=
RUN_DEPENDS-main=
WANTLIB-main= c m ncurses pthread readline
MASTER_SITES= ${HOMEPAGE}dist/${MODGHC_VER}/
MASTER_SITES0= ${HOMEPAGE}docs/${MODGHC_VER}/
MASTER_SITES1= http://openbsd.dead-parrot.de/distfiles/
DIST_SUBDIR= ghc-${MODGHC_VER}
DOC_FILES= Cabal users_guide libraries
DOC_DIR= ${PREFIX}/share/doc/ghc
.if ${FLAVOR:L:Mnative_bootstrap}
# In theory, even older versions should work, but the only version
# tested with is 6.2.2.
BUILD_DEPENDS+= :ghc->=6.2.2:lang/ghc
.else
HCFILES= ghc-${MODGHC_VER}-${ARCH}-unknown-openbsd-hc.tar.bz2:1
CONFIGURE_ARGS= --enable-hc-boot
.endif
DISTFILES= ghc-${MODGHC_VER}-src.tar.bz2 \
ghc-${MODGHC_VER}-src-extralibs.tar.bz2 \
ghc-testsuite-6.6.1.tar.gz \
${DOC_FILES:C/(.+)/\1.html.tar.gz:0/g} \
${HCFILES}
# HC file bundles for non-native bootstrapping. To build a registerised
# bundle, run make with ALL_TARGET="stage1 hc-file-bundle" and the
# following configuration settings for GHC (in ${WRKSRC}/mk/build.mk;
# variable settings MAKE_FLAGS may work, too):
#
# GhcBootLibs=YES
# GhcLibHcOpts=-O
# GhcWithInterpreter=NO
# SRC_HC_OPTS=-O -H32 -fasm -keep-hc-files
# SplitObjs=NO
#
# The version and configuration of GHC used to build the bundle must
# match those of the GHC you want to bootstrap from the bundle. Don't
# even try to create a bundle from ghc-6.2.2 and then build ghc-6.6.1
# with it. (same for registerised vs. unregisterised builds).
#
# The general solution for porting this to other architectures will
# be to boot via unregisterised .hc files generated on an architecture
# already running GHC. For more information, see:
# http://hackage.haskell.org/trac/ghc/wiki/Building/Porting
SUPDISTFILES= ghc-${MODGHC_VER}-i386-unknown-openbsd-hc.tar.bz2:1 \
ghc-${MODGHC_VER}-amd64-unknown-openbsd-hc.tar.bz2:1
SUBST_VARS= MODGHC_VER
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu dest
CONFIGURE_ARGS+= --with-gmp-includes=${LOCALBASE}/include \
--with-gmp-libraries=${LOCALBASE}/lib
FAKE_FLAGS+= "stage=2"
post-extract:
@mv ${WRKDIR}/testsuite ${WRKSRC}
.if !${FLAVOR:L:Mnative_bootstrap}
# Bootstrap stage 1 from HC files, then wipe out all .o and .a files and
# resume a "normal" 2-stage build using the compiler just bootstrapped.
# No idea yet what's going wrong with GhcPatchLevel during configure
# (seeo mk/config.mk.in), so explicitely pass UseStage1=YES, to fix the
# build of compat/cbit/unicode.c
MAKE_FLAGS+= BootingFromHc=NO \
UseStage1=YES \
SplitObjs=NO \
GHC=${WRKBUILD}/compiler/ghc-inplace \
HC=${WRKBUILD}/compiler/ghc-inplace \
HAPPY=${WRKSRC}/distrib/fake-happy
BOOT_FLAGS= GhcBootLibs=YES GhcWithInterpreter=NO \
SplitObjs=NO
BOOT_DIRS= utils/mkdependC utils/unlit utils/mkdirhier \
driver/mangler driver/split includes rts libraries \
compat utils compiler
# Override to get profiling libraries and several additional
# utilities installed.
FAKE_FLAGS+= BootingFromHc=NO
do-build:
# Bootstrap an initial ghc from HC files.
.for dir in ${BOOT_DIRS}
cd ${WRKBUILD}/${dir} && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${BOOT_FLAGS} boot all
.endfor
# Cleanup objects and libraries
find ${WRKBUILD} -name '*.[ao]' | xargs rm -f
# Rebuild includes, RTS, and a minimal subset of libraries.
.for dir in includes rts libraries
cd ${WRKBUILD}/${dir} && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} boot all \
GhcBootLibs=YES
.endfor
# Rebuild compat and utils. Build the mini-drivers for ghc
# and ghci right now, else they'll be built during the fake
# stage, which will put the wrong paths into them.
.for dir in compat utils driver/ghc driver/ghci
cd ${WRKBUILD}/${dir} && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} clean boot all
.endfor
cd ${WRKBUILD}/libraries && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} boot all
cd ${WRKBUILD} && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} stage2
.endif
# Create scripts for the Cabal package registry that will be used for
# @exec and @unexec.
post-build:
cd ${WRKBUILD} && sh ${FILESDIR}/mkregunreg.sh ${PREFIX}
post-install:
rm ${PREFIX}/lib/ghc/package.conf
${INSTALL_SCRIPT} ${WRKBUILD}/{un,}register.sh ${PREFIX}/lib/ghc
${INSTALL_DATA_DIR} ${DOC_DIR}
cd ${WRKDIR} && umask 022 && pax -rw ${DOC_FILES} ${DOC_DIR}
do-regress:
cd ${WRKSRC}/testsuite/tests/ghc-regress && \
${MAKE_ENV} ${MAKE_PROGRAM} stage=2 ${MAKE_FLAGS} \
PYTHON="${MODPY_BIN}"
.include <bsd.port.mk>

View File

@ -1,45 +1,40 @@
MD5 (ghc-6.2.2/building.html.tar.gz) = Ro6SkIyft0pTDUtq0oGZwg==
MD5 (ghc-6.2.2/ghc-6.2.2-amd64-unknown-openbsd-hc.tar.bz2) = DEyr0pcuV0xROeqoabzyMg==
MD5 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = AlFK/5/1Aq0yMh8MUHK2wQ==
MD5 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = QgiL/03jDnw6J3z6VdVYng==
MD5 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = sWXksTsrWTQ+CMwV2SCB7Q==
MD5 (ghc-6.2.2/haskell98-report-html.tar.gz) = yc87cFZUYquoEaLSrI9HYw==
MD5 (ghc-6.2.2/hslibs.html.tar.gz) = UjnW69Gpoeh121A5IcVcrw==
MD5 (ghc-6.2.2/libraries.html.tar.gz) = 6BF0MIongquDsj7wCc5E8g==
MD5 (ghc-6.2.2/users_guide.html.tar.gz) = VHXTK04mxdZ4UICP8wMlWA==
RMD160 (ghc-6.2.2/building.html.tar.gz) = zbiMd96G7b10whY7lDshysMTkrU=
RMD160 (ghc-6.2.2/ghc-6.2.2-amd64-unknown-openbsd-hc.tar.bz2) = NjjUE3EChIZZFOVWNWBDMPDHw6w=
RMD160 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = x/Vphoni8jUgLC4dJ5v8PENj3PA=
RMD160 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = evo3DBSPK5w9U9Zi2plvXXwFKC0=
RMD160 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = rJL9M+HC+b+6htcKyupEjqHln3E=
RMD160 (ghc-6.2.2/haskell98-report-html.tar.gz) = aV96dHlhoT8t2DMfQq7Dk2ga0Ok=
RMD160 (ghc-6.2.2/hslibs.html.tar.gz) = Xe7hQfc7qlOTlV/k9f2gHSYyjgQ=
RMD160 (ghc-6.2.2/libraries.html.tar.gz) = 9M4N8gQPkaWlbMYY5o8aouS/AYU=
RMD160 (ghc-6.2.2/users_guide.html.tar.gz) = 0XwsidA9kR36C0SbR4FNLhncYDA=
SHA1 (ghc-6.2.2/building.html.tar.gz) = AtVihSCGKAlIWutFhxPgVDM14kU=
SHA1 (ghc-6.2.2/ghc-6.2.2-amd64-unknown-openbsd-hc.tar.bz2) = 7F6BTFuX21toKGJc6wZhDkMqbco=
SHA1 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = xUnDltVqXEQL50rYWmh7FRbqeYg=
SHA1 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = nKW/7QIhDTcxp2+rXiWoxpAGf94=
SHA1 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = 0rkFGvo4odM6BgwmiTQK1L3vD44=
SHA1 (ghc-6.2.2/haskell98-report-html.tar.gz) = 8DhwdjRLnfD1dr4QFndwIjhakUg=
SHA1 (ghc-6.2.2/hslibs.html.tar.gz) = sEqwdHdRZyEhz34qqUBQC72HPZU=
SHA1 (ghc-6.2.2/libraries.html.tar.gz) = ZK+eeC9+6un39HRFgR9QzzIQ8JM=
SHA1 (ghc-6.2.2/users_guide.html.tar.gz) = f355yxpXgSrETz6YgXV8wniowUs=
SHA256 (ghc-6.2.2/building.html.tar.gz) = aMsjfEXUCgO9u16DunfFU0KhX8W+0+mJjwD2WsBSgdI=
SHA256 (ghc-6.2.2/ghc-6.2.2-amd64-unknown-openbsd-hc.tar.bz2) = x1EG+3sPtLv01Hmp1QtWOczPHlNs7iJOg7TOspdr1lc=
SHA256 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = 4Mf4YbPKLF+aiVuEwUX9vX7v9ihdNcJ1uO3JPrDNJGE=
SHA256 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = oP5+uNRH8l+8YWzbziu04DlhqITCw3lp0eI1iLWIqFI=
SHA256 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = xXyEw+fInTlRbJPnASvutiekD2pC1phjqcfS6fwaLK4=
SHA256 (ghc-6.2.2/haskell98-report-html.tar.gz) = phsdc7LBWlY7eARdNa3/YKmeulslV0hLXpx2I75JGWA=
SHA256 (ghc-6.2.2/hslibs.html.tar.gz) = GS0NldyNKp52yz4xa1yDhHgGugRssyQM1CSF1Jmh5mc=
SHA256 (ghc-6.2.2/libraries.html.tar.gz) = 68+MH9McmjP/ZMqIjwHpkRRkRp9Z5UMsYmuMaGwtkUI=
SHA256 (ghc-6.2.2/users_guide.html.tar.gz) = hG30vt9E8ApDiidshJKJzhstefP6U/sW1XZRey2h5Qk=
SIZE (ghc-6.2.2/building.html.tar.gz) = 55934
SIZE (ghc-6.2.2/ghc-6.2.2-amd64-unknown-openbsd-hc.tar.bz2) = 5045181
SIZE (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = 4650599
SIZE (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = 5406427
SIZE (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = 602956
SIZE (ghc-6.2.2/haskell98-report-html.tar.gz) = 201924
SIZE (ghc-6.2.2/hslibs.html.tar.gz) = 36457
SIZE (ghc-6.2.2/libraries.html.tar.gz) = 524182
SIZE (ghc-6.2.2/users_guide.html.tar.gz) = 197576
MD5 (ghc-6.6.1/Cabal.html.tar.gz) = TNx7DePyZUmYlabM5YQLdA==
MD5 (ghc-6.6.1/ghc-6.6.1-amd64-unknown-openbsd-hc.tar.bz2) = EL3dUlKz5IXqroLqsZr1QQ==
MD5 (ghc-6.6.1/ghc-6.6.1-i386-unknown-openbsd-hc.tar.bz2) = vziNKlzZ8V4y+pcRWz/R/w==
MD5 (ghc-6.6.1/ghc-6.6.1-src-extralibs.tar.bz2) = Q6JrgWCLIGwFatwwMvfaKg==
MD5 (ghc-6.6.1/ghc-6.6.1-src.tar.bz2) = up9K7C/eX/HhVIrmm3iusA==
MD5 (ghc-6.6.1/ghc-testsuite-6.6.1.tar.gz) = Z4r9jlfLRMpsUBJhY9NDeA==
MD5 (ghc-6.6.1/libraries.html.tar.gz) = VTwiHzL/YnAsjoggqOvYWg==
MD5 (ghc-6.6.1/users_guide.html.tar.gz) = 0kxVV02uyWdrg75UKEombg==
RMD160 (ghc-6.6.1/Cabal.html.tar.gz) = TB/zUFMpmDqAWiKPvEdbxRyYibs=
RMD160 (ghc-6.6.1/ghc-6.6.1-amd64-unknown-openbsd-hc.tar.bz2) = VGizOlhdmQ/2/vBlNoILPM0KkmA=
RMD160 (ghc-6.6.1/ghc-6.6.1-i386-unknown-openbsd-hc.tar.bz2) = MQCkMcHaxGPkE4sAuKBcLY5lhBQ=
RMD160 (ghc-6.6.1/ghc-6.6.1-src-extralibs.tar.bz2) = HBjIXZeMSzNpEy4kfII6qpDqhTA=
RMD160 (ghc-6.6.1/ghc-6.6.1-src.tar.bz2) = a4KnRVlCX+X+H6G2eoNDNFe64K0=
RMD160 (ghc-6.6.1/ghc-testsuite-6.6.1.tar.gz) = 0RTxQrOhKQfH2pd5MlpZ36JtkiU=
RMD160 (ghc-6.6.1/libraries.html.tar.gz) = eZGxVHaQGvG3BfKiA7ovA7L3pHc=
RMD160 (ghc-6.6.1/users_guide.html.tar.gz) = Q9tPeKoWW4bL4M3MLDuhGaNM2V0=
SHA1 (ghc-6.6.1/Cabal.html.tar.gz) = scaZtQ8Vgnal+3BrWNIrCdxy5Zs=
SHA1 (ghc-6.6.1/ghc-6.6.1-amd64-unknown-openbsd-hc.tar.bz2) = z74qCcZjRUd2UZoaMFgJiijVO8c=
SHA1 (ghc-6.6.1/ghc-6.6.1-i386-unknown-openbsd-hc.tar.bz2) = o3B5NP1uZpmz/Jgv5jbS4QrW9ZI=
SHA1 (ghc-6.6.1/ghc-6.6.1-src-extralibs.tar.bz2) = E5j2w1GR1SQQouBms4JjXf8NjW0=
SHA1 (ghc-6.6.1/ghc-6.6.1-src.tar.bz2) = zBhGtK1gficHITcc5AQ7GgF80Q4=
SHA1 (ghc-6.6.1/ghc-testsuite-6.6.1.tar.gz) = VzVspsu2UI8ha3NiAivkVmIM4Po=
SHA1 (ghc-6.6.1/libraries.html.tar.gz) = COC8nth+5zLNj6EjmJYC6P0mog0=
SHA1 (ghc-6.6.1/users_guide.html.tar.gz) = mQPNZroLlaY+SLvkZys8adggV0o=
SHA256 (ghc-6.6.1/Cabal.html.tar.gz) = UtCVCKHOMqkRgLUT1dzX0axu9WzupT+SQdWy0ayrZdk=
SHA256 (ghc-6.6.1/ghc-6.6.1-amd64-unknown-openbsd-hc.tar.bz2) = 8KZ17HgLPOr/UDDAmBujUh1SCIyE199kSFa1otz3lbI=
SHA256 (ghc-6.6.1/ghc-6.6.1-i386-unknown-openbsd-hc.tar.bz2) = 1HGmr9VX0fp8B0Iu7NNrGvf9vI/cBaWYGoykqlKCHaM=
SHA256 (ghc-6.6.1/ghc-6.6.1-src-extralibs.tar.bz2) = 0WKoL8OI/dSMMnsJu213jyMT0S1SgvOxIKwIpdTniQI=
SHA256 (ghc-6.6.1/ghc-6.6.1-src.tar.bz2) = SJEmzustu2qF742H1nkuYeG8DViC5LM6dyVBDXlhMsY=
SHA256 (ghc-6.6.1/ghc-testsuite-6.6.1.tar.gz) = nkWMzdkst6tRC7iIN3xXnxfx28Tc6cwIYyW8C3t87CU=
SHA256 (ghc-6.6.1/libraries.html.tar.gz) = DiY2YrBIiI6pIIvdkaurnhTBKpA98WMaEjN2oxtxoF8=
SHA256 (ghc-6.6.1/users_guide.html.tar.gz) = nrZeMcdyx++fNK+nbJgL+Jk97Om3X5rBU/mK5pmv1Fw=
SIZE (ghc-6.6.1/Cabal.html.tar.gz) = 18657
SIZE (ghc-6.6.1/ghc-6.6.1-amd64-unknown-openbsd-hc.tar.bz2) = 6506515
SIZE (ghc-6.6.1/ghc-6.6.1-i386-unknown-openbsd-hc.tar.bz2) = 6565940
SIZE (ghc-6.6.1/ghc-6.6.1-src-extralibs.tar.bz2) = 1928527
SIZE (ghc-6.6.1/ghc-6.6.1-src.tar.bz2) = 4339970
SIZE (ghc-6.6.1/ghc-testsuite-6.6.1.tar.gz) = 1178216
SIZE (ghc-6.6.1/libraries.html.tar.gz) = 1457817
SIZE (ghc-6.6.1/users_guide.html.tar.gz) = 246027

55
lang/ghc/files/mkregunreg.sh Executable file
View File

@ -0,0 +1,55 @@
# $OpenBSD: mkregunreg.sh,v 1.1 2007/07/21 17:14:57 kili Exp $
#
# Create register and unregister scripts for updating the Cabal
# package registry.
# This script must be called from the ghc build directory.
prefix="$1"
pkg_conf="$prefix/lib/ghc/package.conf"
ghc_pkg="$prefix/bin/ghc-pkg"
umask 022
my_ghc_pkg() {
./utils/ghc-pkg/ghc-pkg.bin --global-conf ./driver/package.conf "$@"
}
for p in $(my_ghc_pkg list --simple-output); do
echo $p $p
set -- $(my_ghc_pkg field $p depends)
shift
for d; do
echo $p $d
done
done > deps
exec > register.sh
cat <<- 'EOF'
#! /bin/sh
exec > /dev/null
EOF
tsort -r deps |
while read p; do
echo "$ghc_pkg register - << 'EOF'"
my_ghc_pkg describe $p
echo EOF
done
echo rm -f $pkg_conf.old
exec > unregister.sh
cat <<- 'EOF'
#! /bin/sh
exec > /dev/null
EOF
tsort deps |
sed "s!^!$ghc_pkg unregister !"
cat <<- EOF
rm -f $pkg_conf.old
# If no packages are left, just remove the registry.
if echo '[]' | cmp -s - $pkg_conf; then
rm -f $pkg_conf
fi
EOF

View File

@ -1,15 +1,25 @@
# $OpenBSD: ghc.port.mk,v 1.5 2006/11/20 13:07:20 espie Exp $
# $OpenBSD: ghc.port.mk,v 1.6 2007/07/21 17:14:57 kili Exp $
# Module for Glasgow Haskell Compiler
# Not yet ported to other architectures
# See comments in lang/ghc/Makefile for more information
ONLY_FOR_ARCHS= i386 amd64
# sparc
MODGHC_VER= 6.6.1
# The following is for depending ports only. GHC itself just needs
# MODGHC_VER and ONLY_FOR_ARCHS. This is a little bit ugly, but
# depending ports using CABAL tend to install into locations as
# lib/Foo-${FooVersion}/ghc-${MODGHC_VER}, so they need the exact
# version of ghc. Depending ports thus need full depends specs,
# i.e. RUN_DEPENDS = :ghc-${MODGHC_VERSION}:lang/ghc, and not
# just ::lang/ghc.
.if ${PKGPATH} != "lang/ghc"
BUILD_DEPENDS+= ::lang/ghc
# Only add runtime when it is actually needed (by default yes)
MODGHC_RUNTIME?=Yes
.if ${MODGHC_RUNTIME:L} == "yes"
RUN_DEPENDS+= ::lang/ghc
. if ${MODGHC_RUNTIME:L} == "yes"
RUN_DEPENDS+= :ghc-${MODGHC_VER}:lang/ghc
. endif
.endif

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-Makefile,v 1.5 2005/02/14 01:26:56 dons Exp $
Add a "check" target to make regress work nicely.
--- Makefile.orig Wed Sep 22 03:34:41 2004
+++ Makefile Wed Feb 2 10:55:40 2005
@@ -422,3 +422,17 @@ include $(TOP)/mk/target.mk
# -----------------------------------------------------------------------------
+check::
+ ( cd testsuite/tests/ghc-regress ; $(MAKE) $(MFLAGS) )
+ @(sed 's/ started at .*$$//' actual.result > actual.result_)
+ @(if cmp -s `uname -m`.expected.result actual.result_ ; then \
+ echo "All is good!" ; \
+ else \
+ echo ;\
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
+ echo "Unexpected regress results!" ;\
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
+ echo ;\
+ echo "here is a diff:" ;\
+ diff -u `uname -m`.expected.result actual.result_ ;\
+ fi ; exit 0 )

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-compat_compat_mk,v 1.1 2007/07/21 17:14:57 kili Exp $
When bootstrapping from HC-files, libghccompat needs some symbols
from libHSbase, which is pulled in during linkage anyway, but
unfortunately before libghccompat.
--- compat/compat.mk.orig Wed Apr 25 19:10:39 2007
+++ compat/compat.mk Sun May 6 12:50:19 2007
@@ -21,7 +21,7 @@ endif
# And similarly for when booting from .hc files:
HC_BOOT_LD_OPTS += -L$(GHC_COMPAT_DIR)
-HC_BOOT_LIBS += -lghccompat
+HC_BOOT_LIBS += -lghccompat -lHSbase
ifeq "$(Windows)" "YES"
# not very nice, but required for -lghccompat on Windows

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-compiler_Makefile,v 1.1 2007/07/21 17:14:57 kili Exp $
When bootstrapping from HC-files, don't try to build with interpreter.
Don't set DESTDIR.
--- compiler/Makefile.orig Wed Apr 25 19:10:41 2007
+++ compiler/Makefile Tue May 8 14:08:32 2007
@@ -408,7 +408,7 @@ endif
# enabled when we are bootstrapping with the same version of GHC, and
# the interpreter is supported on this platform.
-ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES"
+ifeq "$(GhcWithInterpreter) $(bootstrapped) $(BootingFromHc)" "YES YES NO"
# Yes, include the interepreter, readline, and Template Haskell extensions
SRC_HC_OPTS += -DGHCI -DBREAKPOINT -package template-haskell
@@ -774,7 +774,6 @@ CLEAN_FILES += $(odir)/ghc-inplace
# but put it together with the libraries.
# Also don't want any interface files installed
-DESTDIR = $(INSTALL_LIBRARY_DIR_GHC)
ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
INSTALL_LIBEXECS += $(GHC_PROG)

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-configure,v 1.8 2005/02/19 03:42:11 dons Exp $
--- configure.orig Tue Oct 19 12:40:17 2004
+++ configure Thu Feb 17 18:13:34 2005
@@ -1506,6 +1506,15 @@ alpha*-unknown-freebsd*)
HostVendor_CPP='unknown'
HostOS_CPP='freebsd'
;;
+amd64*-unknown-openbsd*)
+ HostPlatform=x86_64-unknown-openbsd
+ TargetPlatform=x86_64-unknown-openbsd
+ BuildPlatform=x86_64-unknown-openbsd
+ HostPlatform_CPP='x86_64_unknown_openbsd'
+ HostArch_CPP='x86_64'
+ HostVendor_CPP='unknown'
+ HostOS_CPP='openbsd'
+ ;;
arm*-linux*)
HostPlatform=arm-unknown-linux # hack again
TargetPlatform=arm-unknown-linux

View File

@ -1,75 +0,0 @@
$OpenBSD: patch-distrib_hc-build,v 1.5 2005/02/19 03:42:11 dons Exp $
SplitObjs just slows things down, and can overrun ulimits. It does
produce smaller binaries though...
Help ghc find libgmp.a
And GHC produces stack_smash_handler() core dumps on sparc
unless propolice is turned off. This used to happen on x86, but
has been fixed. Someone want to fix this on sparc?
For some odd reason the existing regex doesn't want to remove all *.o
and *.a files from the libraries. Can't work out why.
Touch some things so that 'make fake' doesn't rebuild the compiler
Make stage=2 after everything else, so as to get a working ghci. Unknown
why ghci doesn't work just via .hc files.
--- distrib/hc-build.orig Wed Sep 3 05:15:19 2003
+++ distrib/hc-build Thu Feb 17 19:30:42 2005
@@ -29,20 +29,31 @@ fi
case "$configopts" in
*--enable-hc-boot-unregisterised*)
cat >mk/build.mk <<END
-GhcWithInterpreter=NO
GhcWithNativeCodeGen=NO
SplitObjs=NO
-GhcLibWays=
+SRC_HC_OPTS+=-L\$(LOCALBASE)/lib
+SRC_CC_OPTS+=-L\$(LOCALBASE)/lib
+GhcUnregisterised=YES
END
;;
*)
cat >mk/build.mk <<END
# empty
+SplitObjs=NO
+SRC_HC_OPTS+=-L\$(LOCALBASE)/lib
+SRC_CC_OPTS+=-L\$(LOCALBASE)/lib
END
;;
esac
+if [ `uname -m` == "sparc" ] ; then
+ echo "SRC_HC_OPTS+=-optc-fno-stack-protector" >> mk/build.mk
+ echo "SRC_CC_OPTS+=-fno-stack-protector" >> mk/build.mk
+fi
+
+export CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
+
echo "*** Building compiler..."
./configure --enable-hc-boot $configopts
@@ -77,7 +88,7 @@ PRIMOP_BITS="primop-data-decl.hs-incl \
# Remove the old libraries. Don't use make clean, because we don't
# want to delete the .hs files generated from the .hsc files, because
# we don't have hsc2hs built yet.
-find libraries hslibs | grep '\.\(o\|a\)$' | xargs rm -f
+find libraries hslibs | grep '\.[oa]$' | xargs rm -f
# Do includes and RTS now
$MAKE -C ghc/includes boot && $MAKE -C ghc/includes all
@@ -95,6 +106,10 @@ $MAKE -C hslibs boot all
# The reconfigure step updates a few files, which can lead to
# unnecessary recompilations. Touch a bunch of things here to avoid
# having to recompile stuff that we've already built.
-(cd ghc/compiler; touch $PRIMOP_BITS parser/hschooks.o prelude/PrimOp.o main/Config.hs main/Config.o ghc-*)
+#(cd ghc/compiler/; touch $PRIMOP_BITS main/Config.hs stage1/parser/hschooks.o stage1/prelude/PrimOp.o stage1/main/Config.o stage1/ghc-* ghc-inplace)
# At this point, the tree should be safe to do 'make install' in.
+
+# now, ghci doesn't work when build via .hc, so make stage=2, and build
+# it via .hs
+(cd ghc/compiler; touch prelude/primops.txt ; gmake boot stage=2 && gmake stage=2)

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-ghc_compiler_Makefile,v 1.6 2005/02/14 01:26:56 dons Exp $
--- ghc/compiler/Makefile.orig Wed Oct 13 20:09:08 2004
+++ ghc/compiler/Makefile Wed Feb 2 10:55:40 2005
@@ -533,7 +533,6 @@ CLEAN_FILES += $(odir)/ghc-inplace ghc-i
# but put it together with the libraries.
# Also don't want any interface files installed
-DESTDIR = $(INSTALL_LIBRARY_DIR_GHC)
ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
INSTALL_LIBEXECS += $(HS_PROG)

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-ghc_driver_mangler_ghc-asm_lprl,v 1.7 2005/02/19 03:42:11 dons Exp $
How to pattern match amd64 asm.
--- ghc/driver/mangler/ghc-asm.lprl.orig Thu Sep 16 02:29:49 2004
+++ ghc/driver/mangler/ghc-asm.lprl Thu Feb 17 18:13:34 2005
@@ -230,7 +230,7 @@ sub init_TARGET_STUFF {
$T_HDR_direct = "\.text\n\t\.align 8\n";
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^x86_64-.*-linux$/ ) {
+ } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd)$/ ) {
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = ''; # _ if symbols have an underscore on the front

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-ghc_includes_Makefile,v 1.3 2005/02/14 01:26:56 dons Exp $
Get the real gmp.h, not the obsolete one ghc brings with it
--- ghc/includes/Makefile.orig Thu Sep 4 19:56:16 2003
+++ ghc/includes/Makefile Wed Feb 2 10:55:40 2005
@@ -27,8 +27,8 @@ boot :: gmp.h
all :: $(H_CONFIG) NativeDefs.h
# gmp.h is copied from the GMP directory
-gmp.h : $(FPTOOLS_TOP)/ghc/rts/gmp/gmp.h
- $(CP) $< $@
+gmp.h :
+ $(CP) $(LOCALBASE)/include/gmp.h $@
# The fptools configure script creates the configuration header file
# and puts it in fptools/mk/config.h. We copy it down to here, prepending

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-ghc_rts_package_conf_in,v 1.3 2004/04/26 23:48:50 dons Exp $
Added extra ld options for the runtime system so it can find
libgmp. There is code in mk/package.mk that will:
s/LOCALBASE/${LOCALBASE}/
so that this points to the right place. This is required so that
Haskell programs, which pull in the shared runtime system, can
find gmp.
--- ghc/rts/package.conf.in.orig Sat May 17 10:11:27 2003
+++ ghc/rts/package.conf.in Wed Aug 6 15:12:45 2003
@@ -133,6 +133,7 @@
, "-u", "GHCziWeak_runFinalizzerBatch_closure"
, "-u", "__stginit_Prelude"
#endif
+ , "-L", "LOCALBASE/lib"
]
#ifdef HAVE_FRAMEWORK_HASKELLSUPPORT
, extra_frameworks = [ "HaskellSupport" ]

View File

@ -0,0 +1,37 @@
$OpenBSD: patch-libraries_Cabal_Distribution_Simple_Register_hs,v 1.1 2007/07/21 17:14:58 kili Exp $
Be more quiet, I don't want to see all that blurb from ghc-pkg.
Instead of a huge echo, just use a here-document.
--- libraries/Cabal/Distribution/Simple/Register.hs.orig Wed Apr 25 19:23:22 2007
+++ libraries/Cabal/Distribution/Simple/Register.hs Sun Jul 15 14:53:40 2007
@@ -342,7 +342,7 @@ rawSystemEmit scriptName True verbosity path args = do
#if mingw32_HOST_OS || mingw32_TARGET_OS
writeFile scriptName ("@" ++ path ++ concatMap (' ':) args)
#else
- writeFile scriptName ("#!/bin/sh\n\n"
+ writeFile scriptName ("#!/bin/sh\nexec > /dev/null\n"
++ (path ++ concatMap (' ':) args)
++ "\n")
p <- getPermissions scriptName
@@ -360,17 +360,12 @@ rawSystemPipe scriptName verbose pipeFrom path args =
#if mingw32_HOST_OS || mingw32_TARGET_OS
writeFile scriptName ("@" ++ path ++ concatMap (' ':) args)
#else
- writeFile scriptName ("#!/bin/sh\n\n"
- ++ "echo '" ++ escapeForShell pipeFrom
- ++ "' | "
- ++ (path ++ concatMap (' ':) args)
- ++ "\n")
+ writeFile scriptName ("#!/bin/sh\nexec > /dev/null\n"
+ ++ (path ++ concatMap (' ':) args) ++ " << 'EOF'\n"
+ ++ pipeFrom ++ "\nEOF\n")
p <- getPermissions scriptName
setPermissions scriptName p{executable=True}
#endif
- where escapeForShell [] = []
- escapeForShell (c@'\'':cs) = c : c : escapeForShell cs
- escapeForShell (c :cs) = c : escapeForShell cs
-- ------------------------------------------------------------
-- * Testing

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-mk_bootstrap_mk,v 1.5 2007/07/21 17:14:58 kili Exp $
Don't use -fno-unit-at-a-time on amd64 when bootstrapping from HC files.
Pull in our system libgmp.
libreadline needs libncurses.
--- mk/bootstrap.mk.orig Wed Apr 25 19:10:40 2007
+++ mk/bootstrap.mk Sat Jun 2 14:01:38 2007
@@ -22,7 +22,7 @@ PLATFORM_HC_BOOT_CC_OPTS += -fno-defer-pop -fomit-fram
endif
ifeq "$(x86_64_TARGET_ARCH)" "1"
-PLATFORM_HC_BOOT_CC_OPTS += -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-unit-at-a-time -fno-builtin
+PLATFORM_HC_BOOT_CC_OPTS += -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-builtin
endif
ifeq "$(hppa_TARGET_ARCH)" "1"
@@ -83,9 +83,11 @@ endif
ifeq "$(HaveLibGmp)" "NO"
DASH_L_GHC_RTS_GMP_DIR=-L$(FPTOOLS_TOP_ABS)/$(GHC_RTS_DIR_REL)/gmp
+else
+DASH_L_GHC_RTS_GMP_DIR=-L$(GMP_LIB_DIRS)
endif
-HC_BOOT_LD_OPTS = \
+HC_BOOT_LD_OPTS += \
-L$(FPTOOLS_TOP_ABS)/$(GHC_RTS_DIR_REL) \
$(DASH_L_GHC_RTS_GMP_DIR) \
-L$(FPTOOLS_TOP_ABS)/libraries/base \
@@ -142,7 +144,7 @@ HC_BOOT_LD_OPTS += \
HC_BOOT_LIBS =
ifeq "$(GhcWithInterpreter)" "YES"
-HC_BOOT_LIBS += -lHSreadline -lreadline -lHStemplate-haskell -lHSunix -lHSunix_cbits
+HC_BOOT_LIBS += -lHSreadline -lreadline -lcurses -lHStemplate-haskell -lHSunix -lHSunix_cbits
endif
HC_BOOT_LIBS += -lHSCabal -lHShaskell98 -lHSregex-compat -lHSregex-posix -lHSregex-base -lHSbase -lHSbase_cbits -lHSparsec -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-mk_config_mk_in,v 1.1 2007/07/21 17:14:58 kili Exp $
--- mk/config.mk.in.orig Wed Apr 25 19:10:41 2007
+++ mk/config.mk.in Wed Jun 20 18:48:41 2007
@@ -513,11 +513,11 @@ libdir = $(prefix)
else
#
-# Unix: override libdir and datadir to put ghc-specific stuff in
-# a subdirectory with the version number included.
+# Unix: put everything into a ghc subdirectory, but don't fiddle with
+# version numbers, please. Datadir is only used for haddock defaults.
#
-libdir = $(libdir0)/ghc-$(ProjectVersion)
-datadir = $(datadir0)/ghc-$(ProjectVersion)
+libdir = $(libdir0)/ghc
+datadir = $(datadir0)/doc/ghc
endif # Windows

View File

@ -1,20 +1,26 @@
$OpenBSD: patch-mk_package_mk,v 1.4 2005/02/14 01:26:56 dons Exp $
Substitute in the path to localbase in the runtime package file,
so it can find libgmp.
$OpenBSD: patch-mk_package_mk,v 1.5 2007/07/21 17:14:58 kili Exp $
--- mk/package.mk.orig Mon Jan 31 14:46:41 2005
+++ mk/package.mk Mon Jan 31 14:47:09 2005
@@ -23,11 +23,13 @@ PKGCONF_CPP_EXTRA_OPTS =
endif
No html subdirectories so we don't confuse haddock for ports depending
on this. See also patch-mk_config_mk_in, which changes datadir (and
this influences PKG_DATADIR).
--- mk/package.mk.orig Wed Apr 25 19:10:41 2007
+++ mk/package.mk Wed Jun 20 18:59:27 2007
@@ -45,7 +45,7 @@ DATA_DIR_INSTALLED = $(PKG_DATADIR)
DATA_DIR_INPLACE = $(FPTOOLS_TOP_ABS)/libraries/$(PACKAGE)
package.conf.inplace : package.conf.in
+ perl -pi.bak -e 's,LOCALBASE,'$(LOCALBASE)',' $<
$(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< | \
grep -v '^#pragma GCC' | \
sed -e 's/""//g' -e 's/\[ *,/[ /g' >$@
HTML_DIR_INPLACE = $(FPTOOLS_TOP_ABS)/libraries/$(PACKAGE)/html
-HTML_DIR_INSTALLED = $(PKG_DATADIR)/html/libraries/$(PACKAGE)
+HTML_DIR_INSTALLED = $(PKG_DATADIR)/libraries/$(PACKAGE)
package.conf.installed : package.conf.in
+ perl -pi.bak -e 's,LOCALBASE,'$(LOCALBASE)',' $<
$(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< | \
grep -v '^#pragma GCC' | \
sed -e 's/""//g' -e 's/\[ *,/[ /g' >$@
HADDOCK_IFACE_INPLACE = $(HTML_DIR_INPLACE)/$(PACKAGE).haddock
HADDOCK_IFACE_INSTALLED = $(HTML_DIR_INSTALLED)/$(PACKAGE).haddock
@@ -371,7 +371,7 @@ CLEAN_FILES += $(PACKAGE).haddock
%.raw-hs : %.hs
$(HC) $(HC_OPTS) -D__HADDOCK__ -E $< -o $@
-HTML_INSTALL_DIR = $(datadir)/html/libraries/$(PACKAGE)
+HTML_INSTALL_DIR = $(datadir)/libraries/$(PACKAGE)
# NOT the same as HTML_DIR_INSTALLED when BIN_DIST is on
install-docs :: $(HTML_DOC)

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-rts_Adjustor_c,v 1.1 2007/07/21 17:14:58 kili Exp $
--- rts/Adjustor.c.orig Wed Apr 25 19:10:41 2007
+++ rts/Adjustor.c Thu May 31 22:08:54 2007
@@ -85,12 +85,8 @@ static void GNUC3_ATTRIBUTE(used) obscure_ccall_wrapp
}
extern void obscure_ccall_ret_code(void);
-#if defined(openbsd_HOST_OS)
-static unsigned char *obscure_ccall_ret_code_dyn;
#endif
-#endif
-
#if defined(x86_64_HOST_ARCH)
static void GNUC3_ATTRIBUTE(used) obscure_ccall_wrapper(void)
{
@@ -324,11 +320,7 @@ createAdjustor(int cconv, StgStablePtr hptr,
adj_code[0x0a] = (unsigned char)0x68; /* pushl obscure_ccall_ret_code */
*((StgFunPtr*)(adj_code + 0x0b)) =
-#if !defined(openbsd_HOST_OS)
(StgFunPtr)obscure_ccall_ret_code;
-#else
- (StgFunPtr)obscure_ccall_ret_code_dyn;
-#endif
adj_code[0x0f] = (unsigned char)0xff; /* jmp *%eax */
adj_code[0x10] = (unsigned char)0xe0;
@@ -1100,22 +1092,4 @@ if ( *(unsigned char*)ptr != 0xe8 ) {
*((unsigned char*)ptr) = '\0';
freeExec(ptr);
-}
-
-
-/*
- * Function: initAdjustor()
- *
- * Perform initialisation of adjustor thunk layer (if needed.)
- */
-void
-initAdjustor(void)
-{
-#if defined(i386_HOST_ARCH) && defined(openbsd_HOST_OS)
- obscure_ccall_ret_code_dyn = allocateExec(4);
- obscure_ccall_ret_code_dyn[0] = ((unsigned char *)obscure_ccall_ret_code)[0];
- obscure_ccall_ret_code_dyn[1] = ((unsigned char *)obscure_ccall_ret_code)[1];
- obscure_ccall_ret_code_dyn[2] = ((unsigned char *)obscure_ccall_ret_code)[2];
- obscure_ccall_ret_code_dyn[3] = ((unsigned char *)obscure_ccall_ret_code)[3];
-#endif
}

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-rts_Linker_c,v 1.1 2007/07/21 17:14:58 kili Exp $
We don't have MAP_ANONYMOUS (which is the same as MAP_ANON on Linux,
but the latter has been deprecated). We also don't have that MAP_32BIT
Linux provides for amd64, so just zap that flag to 0. Note that
this isn't enough to make ghci work on amd64. The definite solution
would be real dynamic libraries created and used by GHC, so we could
drop most of that home-brewn linking code at all.
--- rts/Linker.c.orig Wed Apr 25 19:10:41 2007
+++ rts/Linker.c Wed May 23 13:59:08 2007
@@ -73,6 +73,11 @@
#endif
+#ifdef openbsd_HOST_OS
+# define MAP_ANONYMOUS MAP_ANON
+# define MAP_32BIT 0
+#endif
+
#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS)
# define OBJFORMAT_ELF
#elif defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-rts_Makefile,v 1.1 2007/07/21 17:14:58 kili Exp $
--- rts/Makefile.orig Wed Apr 25 19:10:41 2007
+++ rts/Makefile Thu May 3 14:10:53 2007
@@ -192,10 +192,11 @@ SRC_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEB
# -----------------------------------------------------------------------------
# The auto-generated apply code
-# We want a slightly different version for the unregisterised way, so we make
-# AutoApply on a per-way basis (eg. AutoApply_p.cmm).
+# The original AutoApply$(_way).cmm trick breaks hc bundle generation.
+# For the OpenBSD port, we won't do both ways (registered and
+# unregistered) in one shot, so just keep this simple and unbreak the build.
-AUTO_APPLY_CMM = AutoApply$(_way).cmm
+AUTO_APPLY_CMM = AutoApply.cmm
ifneq "$(BootingFromHc)" "YES"
$(AUTO_APPLY_CMM): $(GHC_GENAPPLY)

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-rts_RtsStartup_c,v 1.1 2007/07/21 17:14:58 kili Exp $
--- rts/RtsStartup.c.orig Wed Apr 25 19:10:41 2007
+++ rts/RtsStartup.c Thu May 31 22:09:15 2007
@@ -180,9 +180,6 @@ hs_init(int *argc, char **argv[])
synchroniseSystem(); // calls initParallelSystem etc
#endif /* PAR */
- /* Perform initialisation of adjustor thunk layer. */
- initAdjustor();
-
/* initialise scheduler data structures (needs to be done before
* initStorage()).
*/

View File

@ -1,5 +1,6 @@
The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler for the functional programming language Haskell 98.
This package contains the language definition, users guide, build
instructions, and library specifications.
This package contains the users guide and documentation of GHC
extensions to the standard libraries. For documentation about Haskell
itself, install the haskell-report package.

View File

@ -15,3 +15,10 @@ interactive environment for the functional language Haskell. Highlights:
* Profiling is supported, both by time/allocation and various kinds of
heap profiling.
* GHC comes with a wide range of libraries.
The following flavors are available:
- native_bootstrap (PSEUDO_FLAVOR):
Use an already installed ghc for bootstrapping (default is
to boot from .hc files). If there's no preinstalled GHC, this
may lead to GHC being built twice!

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff