Update ghc to 6.2.2.
Adds support for ghci. More stable foreign function interface. Just i386 at the moment. ok sturm@ pvalchev@
This commit is contained in:
parent
d2dee31acf
commit
cd5fda6e80
@ -1,10 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.17 2004/05/20 00:08:22 dons Exp $
|
||||
# $OpenBSD: Makefile,v 1.18 2005/02/14 01:26:56 dons Exp $
|
||||
#
|
||||
# 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 sparc amd64
|
||||
ONLY_FOR_ARCHS= i386
|
||||
# sparc amd64
|
||||
|
||||
# The general solution for other architectures will be to boot
|
||||
# via unregisterised .hc files generated on openbsd-*-i386. See:
|
||||
@ -22,7 +23,7 @@ ONLY_FOR_ARCHS= i386 sparc amd64
|
||||
COMMENT= "compiler for the functional language Haskell"
|
||||
COMMENT-doc= "documentation for the functional language Haskell"
|
||||
|
||||
V= 6.2.1
|
||||
V= 6.2.2
|
||||
|
||||
DISTNAME= ghc-${V}
|
||||
CATEGORIES= lang
|
||||
@ -56,9 +57,9 @@ DISTFILES= ghc-${V}-src.tar.bz2 \
|
||||
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}-sparc-unknown-openbsd-hc.tar.bz2:2 \
|
||||
ghc-${V}-amd64-unknown-openbsd-hc.tar.bz2:2
|
||||
SUPDISTFILES= ghc-${V}-i386-unknown-openbsd-hc.tar.bz2:2
|
||||
# ghc-${V}-sparc-unknown-openbsd-hc.tar.bz2:2 \
|
||||
# ghc-${V}-amd64-unknown-openbsd-hc.tar.bz2:2
|
||||
|
||||
# datasize around 130M on amd64
|
||||
VMEM_WARNING= Yes
|
||||
@ -84,7 +85,7 @@ do-build:
|
||||
|
||||
# note: ghci not in PLIST since it doesnt work yet
|
||||
|
||||
FAKE_FLAGS+="stage=1"
|
||||
FAKE_FLAGS+="stage=2"
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${DOC_DIR}
|
||||
@ -95,8 +96,8 @@ post-install:
|
||||
|
||||
REGRESS_DEPENDS=::lang/python/2.2
|
||||
REGRESS_RESULT= ${WRKSRC}/actual.result
|
||||
REGRESS_FLAGS= TEST_HC="${WRKSRC}/ghc/compiler/stage1/ghc-inplace"
|
||||
REGRESS_FLAGS+= EXTRA_RUNTEST_OPTS="--output-summary=${REGRESS_RESULT}" \
|
||||
REGRESS_FLAGS= TEST_HC="${WRKSRC}/ghc/compiler/stage2/ghc-inplace"
|
||||
REGRESS_FLAGS+= EXTRA_RUNTEST_OPTS="--output-summary=${REGRESS_RESULT}" \
|
||||
PYTHON="${LOCALBASE}/bin/python2.2"
|
||||
|
||||
# BSD w/o advertising clause
|
||||
|
@ -1,40 +1,32 @@
|
||||
MD5 (ghc-6.2.1/building.html.tar.gz) = 211cb7de99a6db064ed6b1a7b78a3783
|
||||
MD5 (ghc-6.2.1/ghc-6.2.1-amd64-unknown-openbsd-hc.tar.bz2) = c5170c96dee077452b0907d22e30a64b
|
||||
MD5 (ghc-6.2.1/ghc-6.2.1-i386-unknown-openbsd-hc.tar.bz2) = 67375dedb45d413e31c6713e39cb6a7d
|
||||
MD5 (ghc-6.2.1/ghc-6.2.1-sparc-unknown-openbsd-hc.tar.bz2) = 6f401277fa4ca2f341f20c3799789088
|
||||
MD5 (ghc-6.2.1/ghc-6.2.1-src.tar.bz2) = fa9f90fd6b8852679c5fc16509e94d7a
|
||||
MD5 (ghc-6.2.1/ghc-regress-6.2.1.tar.bz2) = cea11024de62cf59d0fdb1b328458ffc
|
||||
MD5 (ghc-6.2.1/haskell98-report-html.tar.gz) = c9cf3b70565462aba811a2d2ac8f4763
|
||||
MD5 (ghc-6.2.1/hslibs.html.tar.gz) = 112d8947c6456544bd7e83033767b7b0
|
||||
MD5 (ghc-6.2.1/libraries.html.tar.gz) = 37f8881eb687c4583734d27eeff356bd
|
||||
MD5 (ghc-6.2.1/users_guide.html.tar.gz) = 049c0e100433a51ec3b3a58f24b780a5
|
||||
RMD160 (ghc-6.2.1/building.html.tar.gz) = ef877bbeddabfe5f94d2032d8eae982c8da2b53f
|
||||
RMD160 (ghc-6.2.1/ghc-6.2.1-amd64-unknown-openbsd-hc.tar.bz2) = 362745462f023acf702911dfe59d3109fc96b6f9
|
||||
RMD160 (ghc-6.2.1/ghc-6.2.1-i386-unknown-openbsd-hc.tar.bz2) = a4967f5cb5d66d3ec6aeb4f6d7d7af180a450561
|
||||
RMD160 (ghc-6.2.1/ghc-6.2.1-sparc-unknown-openbsd-hc.tar.bz2) = cf650fb45e94114d0c236ab22d99afd4ee2d006d
|
||||
RMD160 (ghc-6.2.1/ghc-6.2.1-src.tar.bz2) = 9f041e207379715fcb7ee378743baa42d3be0311
|
||||
RMD160 (ghc-6.2.1/ghc-regress-6.2.1.tar.bz2) = 6a1bee30230ca058b4a12f81103cf1f50f96e132
|
||||
RMD160 (ghc-6.2.1/haskell98-report-html.tar.gz) = 695f7a747961a13f2dd8331f42aec393681ad0e9
|
||||
RMD160 (ghc-6.2.1/hslibs.html.tar.gz) = c99ccf687ee442aaa7f5e863ccb86a8f95f7187f
|
||||
RMD160 (ghc-6.2.1/libraries.html.tar.gz) = 02bda896d561c1e3d87d23e65ca5d885a601a983
|
||||
RMD160 (ghc-6.2.1/users_guide.html.tar.gz) = 9ed4d3b04a648ea89b41bbdb6c0791bbb1dbee23
|
||||
SHA1 (ghc-6.2.1/building.html.tar.gz) = 36975994b77233087f0094cf6c42a15d5215c28b
|
||||
SHA1 (ghc-6.2.1/ghc-6.2.1-amd64-unknown-openbsd-hc.tar.bz2) = 6bb7ab1896ede2fde7d0b591a018d0178aca156d
|
||||
SHA1 (ghc-6.2.1/ghc-6.2.1-i386-unknown-openbsd-hc.tar.bz2) = 7f7a9fd511c418fd59862a7b4674987bfecfe083
|
||||
SHA1 (ghc-6.2.1/ghc-6.2.1-sparc-unknown-openbsd-hc.tar.bz2) = 2243311272223e6889fa4aa3812539e51fefe8a7
|
||||
SHA1 (ghc-6.2.1/ghc-6.2.1-src.tar.bz2) = 84343ff06ee5645ee3f8b428635525e5ebdfcc65
|
||||
SHA1 (ghc-6.2.1/ghc-regress-6.2.1.tar.bz2) = 849a3ddd8ad04648119442ccc674ae8a777e3a40
|
||||
SHA1 (ghc-6.2.1/haskell98-report-html.tar.gz) = f0387076344b9df0f576be1016777022385a9148
|
||||
SHA1 (ghc-6.2.1/hslibs.html.tar.gz) = ec6f1672d8e8319b8bc95fec0235ea8adbe723b9
|
||||
SHA1 (ghc-6.2.1/libraries.html.tar.gz) = e117baf5ca63d8815080dd3877b22c77c25f035c
|
||||
SHA1 (ghc-6.2.1/users_guide.html.tar.gz) = 0cec99c1345b766e44074c04dc8dcf42ad2663a0
|
||||
SIZE (ghc-6.2.1/building.html.tar.gz) = 55933
|
||||
SIZE (ghc-6.2.1/ghc-6.2.1-amd64-unknown-openbsd-hc.tar.bz2) = 5045335
|
||||
SIZE (ghc-6.2.1/ghc-6.2.1-i386-unknown-openbsd-hc.tar.bz2) = 4644186
|
||||
SIZE (ghc-6.2.1/ghc-6.2.1-sparc-unknown-openbsd-hc.tar.bz2) = 4670313
|
||||
SIZE (ghc-6.2.1/ghc-6.2.1-src.tar.bz2) = 5367409
|
||||
SIZE (ghc-6.2.1/ghc-regress-6.2.1.tar.bz2) = 638898
|
||||
SIZE (ghc-6.2.1/haskell98-report-html.tar.gz) = 201924
|
||||
SIZE (ghc-6.2.1/hslibs.html.tar.gz) = 36458
|
||||
SIZE (ghc-6.2.1/libraries.html.tar.gz) = 518568
|
||||
SIZE (ghc-6.2.1/users_guide.html.tar.gz) = 196164
|
||||
MD5 (ghc-6.2.2/building.html.tar.gz) = 468e92908c9fb74a530d4b6ad28199c2
|
||||
MD5 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = 02514aff9ff502ad32321f0c5072b6c1
|
||||
MD5 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = 42088bff4de30e7c3a277cfa55d5589e
|
||||
MD5 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = b165e4b13b2b59343e08cc15d92081ed
|
||||
MD5 (ghc-6.2.2/haskell98-report-html.tar.gz) = c9cf3b70565462aba811a2d2ac8f4763
|
||||
MD5 (ghc-6.2.2/hslibs.html.tar.gz) = 5239d6ebd1a9a1e875db503921c55caf
|
||||
MD5 (ghc-6.2.2/libraries.html.tar.gz) = e81174308a2782ab83b23ef009ce44f2
|
||||
MD5 (ghc-6.2.2/users_guide.html.tar.gz) = 5475d32b4e26c5d67850808ff3032558
|
||||
RMD160 (ghc-6.2.2/building.html.tar.gz) = cdb88c77de86edbd74c2163b943b21cac31392b5
|
||||
RMD160 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = c7f5698689e2f235202c2e1d279bfc3c4363dcf0
|
||||
RMD160 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = 7afa370c148f2b9c3d53d662da996f5d7c05282d
|
||||
RMD160 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = ac92fd33e1c2f9bfba86d70acaea448ea1e59f71
|
||||
RMD160 (ghc-6.2.2/haskell98-report-html.tar.gz) = 695f7a747961a13f2dd8331f42aec393681ad0e9
|
||||
RMD160 (ghc-6.2.2/hslibs.html.tar.gz) = 5deee141f73baa5393955fe4f5fda01d26328e04
|
||||
RMD160 (ghc-6.2.2/libraries.html.tar.gz) = f4ce0df2040f91a5a56cc618e68f1aa2e4bf0185
|
||||
RMD160 (ghc-6.2.2/users_guide.html.tar.gz) = d17c2c89d03d911dfa0b449b47814d2e19dc6030
|
||||
SHA1 (ghc-6.2.2/building.html.tar.gz) = 02d5628520862809485aeb458713e0543335e245
|
||||
SHA1 (ghc-6.2.2/ghc-6.2.2-i386-unknown-openbsd-hc.tar.bz2) = c549c396d56a5c440be74ad85a687b1516ea7988
|
||||
SHA1 (ghc-6.2.2/ghc-6.2.2-src.tar.bz2) = 9ca5bfed02210d3731a76fab5e25a8c690067fde
|
||||
SHA1 (ghc-6.2.2/ghc-regress-6.2.2.tar.bz2) = d2b9051afa38a1d33a060c2689340ad4bdef0f8e
|
||||
SHA1 (ghc-6.2.2/haskell98-report-html.tar.gz) = f0387076344b9df0f576be1016777022385a9148
|
||||
SHA1 (ghc-6.2.2/hslibs.html.tar.gz) = b04ab0747751672121cf7e2aa940500bbd873d95
|
||||
SHA1 (ghc-6.2.2/libraries.html.tar.gz) = 64af9e782f7eeae9f7f47445811f50cf3210f093
|
||||
SHA1 (ghc-6.2.2/users_guide.html.tar.gz) = 7f7e79cb1a57812ac44f3e9881757cc278a8c14b
|
||||
SIZE (ghc-6.2.2/building.html.tar.gz) = 55934
|
||||
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
|
||||
|
@ -1,9 +1,10 @@
|
||||
# $OpenBSD: ghc.port.mk,v 1.1 2004/08/10 08:14:35 xsa Exp $
|
||||
# $OpenBSD: ghc.port.mk,v 1.2 2005/02/14 01:26:56 dons 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 sparc amd64
|
||||
ONLY_FOR_ARCHS= i386
|
||||
# sparc amd64
|
||||
|
||||
BUILD_DEPENDS+= bin/ghc::lang/ghc
|
||||
RUN_DEPENDS+= bin/ghc::lang/ghc
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-Makefile,v 1.4 2004/04/26 23:48:50 dons Exp $
|
||||
$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 Sat Jul 26 00:44:43 2003
|
||||
+++ Makefile Sun Aug 3 15:46:52 2003
|
||||
@@ -420,3 +420,17 @@
|
||||
--- 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
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.6 2004/04/26 23:48:50 dons Exp $
|
||||
--- configure.orig Sun Apr 18 05:37:53 2004
|
||||
+++ configure Sun Apr 18 05:38:36 2004
|
||||
@@ -1506,6 +1506,15 @@
|
||||
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
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-distrib_hc-build,v 1.3 2004/04/26 23:48:50 dons Exp $
|
||||
$OpenBSD: patch-distrib_hc-build,v 1.4 2005/02/14 01:26:56 dons Exp $
|
||||
SplitObjs just slows things down, and can overrun ulimits. It does
|
||||
produce smaller binaries though...
|
||||
|
||||
@ -13,9 +13,12 @@ and *.a files from the libraries. Can't work out why.
|
||||
|
||||
Touch some things so that 'make fake' doesn't rebuild the compiler
|
||||
|
||||
--- distrib/hc-build.orig Wed Sep 3 05:15:19 2003
|
||||
+++ distrib/hc-build Sun Apr 18 21:33:49 2004
|
||||
@@ -29,10 +29,10 @@
|
||||
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 21:15:19 2003
|
||||
+++ distrib/hc-build Wed Feb 2 13:00:23 2005
|
||||
@@ -29,20 +29,30 @@ fi
|
||||
case "$configopts" in
|
||||
*--enable-hc-boot-unregisterised*)
|
||||
cat >mk/build.mk <<END
|
||||
@ -28,7 +31,6 @@ Touch some things so that 'make fake' doesn't rebuild the compiler
|
||||
END
|
||||
;;
|
||||
|
||||
@@ -39,10 +39,20 @@
|
||||
*)
|
||||
cat >mk/build.mk <<END
|
||||
# empty
|
||||
@ -49,7 +51,7 @@ Touch some things so that 'make fake' doesn't rebuild the compiler
|
||||
echo "*** Building compiler..."
|
||||
./configure --enable-hc-boot $configopts
|
||||
|
||||
@@ -77,7 +87,7 @@
|
||||
@@ -77,7 +87,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.
|
||||
@ -58,11 +60,15 @@ Touch some things so that 'make fake' doesn't rebuild the compiler
|
||||
|
||||
# Do includes and RTS now
|
||||
$MAKE -C ghc/includes boot && $MAKE -C ghc/includes all
|
||||
@@ -95,6 +105,6 @@
|
||||
@@ -95,6 +105,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)
|
||||
+#(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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-ghc_compiler_Makefile,v 1.5 2004/04/26 23:48:50 dons Exp $
|
||||
--- ghc/compiler/Makefile.orig Mon Sep 8 05:52:24 2003
|
||||
+++ ghc/compiler/Makefile Sun Apr 18 20:59:44 2004
|
||||
@@ -503,7 +503,6 @@
|
||||
$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
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
$OpenBSD: patch-ghc_driver_mangler_ghc-asm_lprl,v 1.5 2004/04/26 23:48:50 dons Exp $
|
||||
How to pattern match amd64 asm.
|
||||
--- ghc/driver/mangler/ghc-asm.lprl.orig Sun Apr 18 05:37:46 2004
|
||||
+++ ghc/driver/mangler/ghc-asm.lprl Sun Apr 18 05:39:39 2004
|
||||
@@ -230,7 +230,7 @@
|
||||
$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
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-ghc_includes_Makefile,v 1.2 2004/04/26 23:48:50 dons Exp $
|
||||
$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 Sat Mar 22 02:45:56 2003
|
||||
+++ ghc/includes/Makefile Tue Aug 5 10:25:05 2003
|
||||
@@ -27,8 +27,8 @@
|
||||
--- 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
|
||||
|
@ -1,157 +0,0 @@
|
||||
$OpenBSD: patch-ghc_rts_Adjustor_c,v 1.5 2004/04/26 23:48:50 dons Exp $
|
||||
Ok. This is the magical "adjustor thunk". The entry point into
|
||||
Haskell land from C land. Problem is that it (1) uses dynamically
|
||||
generated code stored on the heap, as well as (2) a nasty little hack
|
||||
that invovles exec'ing some code in .data.
|
||||
|
||||
Solved (1) by using a StablePtr, avoiding malloc memory
|
||||
altogether for the adjustor thunk itself.
|
||||
|
||||
Solved (2) by writing the assembly to do the code they
|
||||
were too lazy to put into asm in the first place.
|
||||
|
||||
--- ghc/rts/Adjustor.c.orig Sat Oct 18 12:04:10 2003
|
||||
+++ ghc/rts/Adjustor.c Sat Oct 18 12:04:08 2003
|
||||
@@ -65,10 +65,11 @@
|
||||
For this to work we make the assumption that bytes in .data
|
||||
are considered executable.
|
||||
*/
|
||||
-static unsigned char __obscure_ccall_ret_code [] =
|
||||
- { 0x83, 0xc4, 0x04 /* addl $0x4, %esp */
|
||||
- , 0xc3 /* ret */
|
||||
- };
|
||||
+static void __obscure_ccall_ret_code(void)
|
||||
+{
|
||||
+ asm("addl $0x4, %esp");
|
||||
+ asm("ret");
|
||||
+}
|
||||
#endif
|
||||
|
||||
#if defined(alpha_TARGET_ARCH)
|
||||
@@ -77,7 +78,6 @@
|
||||
#endif
|
||||
|
||||
#if defined(ia64_TARGET_ARCH)
|
||||
-#include "Storage.h"
|
||||
|
||||
/* Layout of a function descriptor */
|
||||
typedef struct _IA64FunDesc {
|
||||
@@ -85,6 +85,10 @@
|
||||
StgWord64 gp;
|
||||
} IA64FunDesc;
|
||||
|
||||
+#endif
|
||||
+
|
||||
+#include "Storage.h"
|
||||
+
|
||||
static void *
|
||||
stgAllocStable(size_t size_in_bytes, StgStablePtr *stable)
|
||||
{
|
||||
@@ -105,7 +109,6 @@
|
||||
/* and return a ptr to the goods inside the array */
|
||||
return(BYTE_ARR_CTS(arr));
|
||||
}
|
||||
-#endif
|
||||
|
||||
void*
|
||||
createAdjustor(int cconv, StgStablePtr hptr, StgFunPtr wptr)
|
||||
@@ -128,8 +131,13 @@
|
||||
<c>: ff e0 jmp %eax # and jump to it.
|
||||
# the callee cleans up the stack
|
||||
*/
|
||||
- if ((adjustor = stgMallocBytes(14, "createAdjustor")) != NULL) {
|
||||
- unsigned char *const adj_code = (unsigned char *)adjustor;
|
||||
+ {
|
||||
+ StgStablePtr stable;
|
||||
+ unsigned char *adj_code;
|
||||
+
|
||||
+ adjustor = stgAllocStable(18, &stable);
|
||||
+ adj_code = (unsigned char *)adjustor;
|
||||
+
|
||||
adj_code[0x00] = (unsigned char)0x58; /* popl %eax */
|
||||
|
||||
adj_code[0x01] = (unsigned char)0x68; /* pushl hptr (which is a dword immediate ) */
|
||||
@@ -142,6 +150,8 @@
|
||||
|
||||
adj_code[0x0c] = (unsigned char)0xff; /* jmp %eax */
|
||||
adj_code[0x0d] = (unsigned char)0xe0;
|
||||
+
|
||||
+ *((StgStablePtr*)(adj_code + 0x0e)) = (StgStablePtr)stable;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -172,9 +182,13 @@
|
||||
That's (thankfully) the case here with the restricted set of
|
||||
return types that we support.
|
||||
*/
|
||||
- if ((adjustor = stgMallocBytes(17, "createAdjustor")) != NULL) {
|
||||
- unsigned char *const adj_code = (unsigned char *)adjustor;
|
||||
+ {
|
||||
+ StgStablePtr stable;
|
||||
+ unsigned char *adj_code;
|
||||
|
||||
+ adjustor = stgAllocStable(21, &stable);
|
||||
+ adj_code = (unsigned char *)adjustor;
|
||||
+
|
||||
adj_code[0x00] = (unsigned char)0x68; /* pushl hptr (which is a dword immediate ) */
|
||||
*((StgStablePtr*)(adj_code+0x01)) = (StgStablePtr)hptr;
|
||||
|
||||
@@ -186,6 +200,8 @@
|
||||
|
||||
adj_code[0x0f] = (unsigned char)0xff; /* jmp *%eax */
|
||||
adj_code[0x10] = (unsigned char)0xe0;
|
||||
+
|
||||
+ *((StgStablePtr*)(adj_code+0x11)) = (StgStablePtr)stable;
|
||||
}
|
||||
#elif defined(sparc_TARGET_ARCH)
|
||||
/* Magic constant computed by inspecting the code length of the following
|
||||
@@ -217,9 +233,13 @@
|
||||
similarly, and local variables should be accessed via %fp, not %sp. In a
|
||||
nutshell: This should work! (Famous last words! :-)
|
||||
*/
|
||||
- if ((adjustor = stgMallocBytes(4*(11+1), "createAdjustor")) != NULL) {
|
||||
- unsigned long *const adj_code = (unsigned long *)adjustor;
|
||||
+ {
|
||||
+ StgStablePtr stable;
|
||||
+ unsigned long *adj_code;
|
||||
|
||||
+ adjustor = stgAllocStable(4*(11+2), &stable);
|
||||
+ adj_code = (unsigned long *)adjustor;
|
||||
+
|
||||
adj_code[ 0] = 0x9C23A008UL; /* sub %sp, 8, %sp */
|
||||
adj_code[ 1] = 0xDA23A060UL; /* st %o5, [%sp + 96] */
|
||||
adj_code[ 2] = 0xD823A05CUL; /* st %o4, [%sp + 92] */
|
||||
@@ -237,6 +257,7 @@
|
||||
adj_code[10] |= ((unsigned long)hptr) & 0x000003FFUL;
|
||||
|
||||
adj_code[11] = (unsigned long)hptr;
|
||||
+ adj_code[12] = (unsigned long)stable;
|
||||
|
||||
/* flush cache */
|
||||
asm("flush %0" : : "r" (adj_code ));
|
||||
@@ -476,12 +497,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Free the stable pointer first..*/
|
||||
+ /* Free the internal stable pointer first..*/
|
||||
if (*(unsigned char*)ptr == 0x68) { /* Aha, a ccall adjustor! */
|
||||
freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x01)));
|
||||
+ freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x11)));
|
||||
} else {
|
||||
freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x02)));
|
||||
+ freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x0e)));
|
||||
}
|
||||
+ return;
|
||||
#elif defined(sparc_TARGET_ARCH)
|
||||
if ( *(unsigned long*)ptr != 0x9C23A008UL ) {
|
||||
fprintf(stderr, "freeHaskellFunctionPtr: not for me, guv! %p\n", ptr);
|
||||
@@ -490,6 +514,8 @@
|
||||
|
||||
/* Free the stable pointer first..*/
|
||||
freeStablePtr(*((StgStablePtr*)((unsigned long*)ptr + 11)));
|
||||
+ freeStablePtr(*((StgStablePtr*)((unsigned long*)ptr + 12)));
|
||||
+ return;
|
||||
#elif defined(alpha_TARGET_ARCH)
|
||||
if ( *(StgWord64*)ptr != 0xa77b0018a61b0010L ) {
|
||||
fprintf(stderr, "freeHaskellFunctionPtr: not for me, guv! %p\n", ptr);
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-libraries_base_Makefile,v 1.1 2004/04/26 23:48:50 dons Exp $
|
||||
Fix to prevent stub file building when bootstrapping.
|
||||
This is a bug in the build infrastructure.
|
||||
|
||||
--- libraries/base/Makefile.orig Thu Dec 18 22:28:46 2003
|
||||
+++ libraries/base/Makefile Thu Dec 18 22:28:48 2003
|
||||
@@ -72,12 +72,13 @@
|
||||
CLEAN_FILES += GHC/PrimopWrappers.hs
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
-
|
||||
+ifneq "$(BootingFromHc)" "YES"
|
||||
STUBOBJS += \
|
||||
Control/Concurrent_stub.$(way_)o
|
||||
|
||||
CLEAN_FILES += $(STUBOBJS) \
|
||||
Control/Concurrent_stub.[ch]
|
||||
+endif
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Building the library for GHCi
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-mk_bootstrap_mk,v 1.3 2004/05/20 00:08:22 dons Exp $
|
||||
Make sure we know how to build things. I don't know why this isn't
|
||||
needed on, e.g. linux
|
||||
|
||||
--- mk/bootstrap.mk.orig Wed Feb 4 21:05:04 2004
|
||||
+++ mk/bootstrap.mk Thu May 20 09:49:39 2004
|
||||
@@ -8,6 +8,8 @@
|
||||
# compile the .hc files, so we have to duplicate that functionality here.
|
||||
# The result is unfortunately ugly, but we don't have another choice.
|
||||
|
||||
+include $(TOP)/mk/suffix.mk
|
||||
+
|
||||
TOP_SAVED := $(TOP)
|
||||
TOP:=$(TOP)/ghc
|
||||
|
@ -1,19 +1,20 @@
|
||||
$OpenBSD: patch-mk_package_mk,v 1.3 2004/04/26 23:48:50 dons Exp $
|
||||
$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.
|
||||
|
||||
--- mk/package.mk.orig Tue Mar 2 22:08:31 2004
|
||||
+++ mk/package.mk Fri Mar 26 16:15:31 2004
|
||||
@@ -23,10 +23,12 @@
|
||||
--- 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
|
||||
|
||||
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' >$@
|
||||
|
||||
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' >$@
|
||||
|
||||
|
1836
lang/ghc/pkg/PLIST
1836
lang/ghc/pkg/PLIST
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-doc,v 1.6 2004/09/15 19:16:08 espie Exp $
|
||||
@comment $OpenBSD: PLIST-doc,v 1.7 2005/02/14 01:26:56 dons Exp $
|
||||
share/doc/ghc/
|
||||
share/doc/ghc/building/
|
||||
share/doc/ghc/building/building-docs.html
|
||||
@ -517,8 +517,8 @@ share/doc/ghc/users_guide/win32.html
|
||||
share/doc/ghc/users_guide/wrong-compilee.html
|
||||
share/doc/ghc/users_guide/wrong.html
|
||||
share/doc/ghc/users_guide/x1075.html
|
||||
share/doc/ghc/users_guide/x11075.html
|
||||
share/doc/ghc/users_guide/x11083.html
|
||||
share/doc/ghc/users_guide/x11094.html
|
||||
share/doc/ghc/users_guide/x1712.html
|
||||
share/doc/ghc/users_guide/x956.html
|
||||
share/doc/ghc/users_guide/x11124.html
|
||||
share/doc/ghc/users_guide/x11132.html
|
||||
share/doc/ghc/users_guide/x11143.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user