aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ghc5
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2003-12-13 00:33:17 +0800
committerobraun <obraun@FreeBSD.org>2003-12-13 00:33:17 +0800
commit9a541235b3a4c2e58c904dfe21e68511fcbdb659 (patch)
treef22a5955d2aa07c4426db60a1909c59e16f9a6b1 /lang/ghc5
parent59da034cfd237dab4d13ddc35f1267fe5770e1d3 (diff)
downloadfreebsd-ports-gnome-9a541235b3a4c2e58c904dfe21e68511fcbdb659.tar.gz
freebsd-ports-gnome-9a541235b3a4c2e58c904dfe21e68511fcbdb659.tar.zst
freebsd-ports-gnome-9a541235b3a4c2e58c904dfe21e68511fcbdb659.zip
- Fix build on -CURRENT by importing some gcc33 fixes
- Fix linker issue on -CURRENT by not using SplitObjs, same as: http://www.haskell.org/pipermail/glasgow-haskell-users/2003-June/005289.html - Use libgmp from ports on -CURRENT (saves further patching) - Bump PORTREVISION PR: ports/60155 Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de> Approved by: maintainer
Diffstat (limited to 'lang/ghc5')
-rw-r--r--lang/ghc5/Makefile21
-rw-r--r--lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs15
-rw-r--r--lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs28
-rw-r--r--lang/ghc5/files/extra-patch-ghc-rts-RtsFlags.c12
-rw-r--r--lang/ghc5/files/extra-patch-ghc-rts-rts.conf.in10
-rw-r--r--lang/ghc5/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c20
-rw-r--r--lang/ghc5/pkg-plist2
7 files changed, 106 insertions, 2 deletions
diff --git a/lang/ghc5/Makefile b/lang/ghc5/Makefile
index 364f61f0458d..a9a65e35315f 100644
--- a/lang/ghc5/Makefile
+++ b/lang/ghc5/Makefile
@@ -6,6 +6,7 @@
PORTNAME= ghc
PORTVERSION= 5.04.3
+PORTREVISION= 1
CATEGORIES= lang haskell
MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/:source \
http://www.haskell.org/ghc/dist/${PORTVERSION}/FreeBSD/:boot
@@ -25,12 +26,19 @@ DISTFILES= ${SRC_DIST}
DISTFILES+= ${BOOT_DIST}
.else
DISTFILES+= ${BOOT_DIST5}
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs \
+ ${FILESDIR}/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs \
+ ${FILESDIR}/extra-patch-ghc-rts-RtsFlags.c \
+ ${FILESDIR}/extra-patch-ghc-rts-rts.conf.in \
+ ${FILESDIR}/extra-patch-ghc-utils-prof-cgprof-cgprof.c
+LIB_DEPENDS= gmp.6:${PORTSDIR}/math/libgmp4
.endif
MAINTAINER= simonmar@microsoft.com
COMMENT= A Compiler for the functional language Haskell
USE_PERL5= yes
+USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -49,6 +57,13 @@ BOOT_GHC= ${BOOT_DIR}/bin/i386-unknown-freebsd/ghc-${PORTVERSION}
CONFIGURE_ARGS= --with-ghc=${BOOT_GHC}
# specifying CONFIGURE_TARGET doesn't work for some reason.
CONFIGURE_TARGET=
+# libgmp:
+.if ${OSVERSION} >= 500000
+CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
+PLIST_SUB+= GMP="@comment "
+.else
+PLIST_SUB+= GMP=""
+.endif
# override TMPDIR because /tmp often doesn't have enough space
# to build some of the larger libraries.
@@ -64,10 +79,13 @@ pre-everything::
@${ECHO_CMD} "Building GHC without profiling libraries."
.endif
-.if defined(WITHOUT_PROFILE)
post-extract:
+.if defined(WITHOUT_PROFILE)
@${ECHO} >>${WRKSRC}/mk/build.mk GhcLibWays=
.endif
+.if ${OSVERSION} >= 500000
+ @${ECHO} >>${WRKSRC}/mk/build.mk SplitObjs=NO
+.endif
post-patch:
@${PERL} -pi -e 's/DrIFT/DrIFT-ghc/g; \
@@ -77,6 +95,7 @@ post-patch:
${WRKSRC}/hslibs/tools/DrIFT/Makefile \
${WRKSRC}/hslibs/tools/DtdToHaskell/Makefile \
${WRKSRC}/hslibs/tools/Xtract/Makefile
+ @${REINPLACE_CMD} s+%%LOCALBASE%%+${LOCALBASE}+ ${WRKSRC}/ghc/rts/rts.conf.in
pre-configure:
@(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
diff --git a/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs b/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs
new file mode 100644
index 000000000000..a196c68cf817
--- /dev/null
+++ b/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs
@@ -0,0 +1,15 @@
+--- ghc/compiler/nativeGen/MachMisc.lhs.orig Thu Dec 11 11:42:12 2003
++++ ghc/compiler/nativeGen/MachMisc.lhs Thu Dec 11 11:44:02 2003
+@@ -71,11 +71,11 @@
+ fmtAsmLbl :: String -> String -- for formatting labels
+
+ fmtAsmLbl s
+- = IF_ARCH_alpha(
+ {- The alpha assembler likes temporary labels to look like $L123
+ instead of L123. (Don't toss the L, because then Lf28
+ turns into $f28.)
+ -}
++ = IF_ARCH_alpha(
+ '$' : s
+ ,{-otherwise-}
+ '.':'L':s
diff --git a/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs b/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs
new file mode 100644
index 000000000000..d8862dafbf78
--- /dev/null
+++ b/lang/ghc5/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs
@@ -0,0 +1,28 @@
+--- ghc/compiler/nativeGen/RegAllocInfo.lhs.orig Tue Jan 29 17:52:32 2002
++++ ghc/compiler/nativeGen/RegAllocInfo.lhs Thu Dec 11 13:30:50 2003
+@@ -808,9 +808,9 @@
+
+ {-I386: spill above stack pointer leaving 3 words/spill-}
+ ,IF_ARCH_i386 ( let off_w = (off-delta) `div` 4
+- in case regClass vreg of
+- RcInteger -> MOV L (OpReg dyn) (OpAddr (spRel off_w))
+- _ -> GST F80 dyn (spRel off_w) -- RcFloat/RcDouble
++ in case regClass vreg of {
++ RcInteger -> MOV L (OpReg dyn) (OpAddr (spRel off_w));
++ _ -> GST F80 dyn (spRel off_w)} -- RcFloat/RcDouble
+
+ {-SPARC: spill below frame pointer leaving 2 words/spill-}
+ ,IF_ARCH_sparc(
+@@ -831,9 +831,9 @@
+ IF_ARCH_alpha( LD sz dyn (spRel (- (off `div` 8)))
+
+ ,IF_ARCH_i386 ( let off_w = (off-delta) `div` 4
+- in case regClass vreg of
+- RcInteger -> MOV L (OpAddr (spRel off_w)) (OpReg dyn)
+- _ -> GLD F80 (spRel off_w) dyn -- RcFloat/RcDouble
++ in case regClass vreg of {
++ RcInteger -> MOV L (OpAddr (spRel off_w)) (OpReg dyn);
++ _ -> GLD F80 (spRel off_w) dyn} -- RcFloat/RcDouble
+
+ ,IF_ARCH_sparc(
+ let off_w = 1 + (off `div` 4)
diff --git a/lang/ghc5/files/extra-patch-ghc-rts-RtsFlags.c b/lang/ghc5/files/extra-patch-ghc-rts-RtsFlags.c
new file mode 100644
index 000000000000..abd3496f68f2
--- /dev/null
+++ b/lang/ghc5/files/extra-patch-ghc-rts-RtsFlags.c
@@ -0,0 +1,12 @@
+--- ghc/rts/RtsFlags.c.orig Thu Dec 11 15:13:07 2003
++++ ghc/rts/RtsFlags.c Thu Dec 11 15:13:17 2003
+@@ -1383,8 +1383,7 @@
+ } else if (RtsFlags.GranFlags.proc > MAX_PROC ||
+ RtsFlags.GranFlags.proc < 1)
+ {
+- fprintf(stderr,"setupRtsFlags: no more than %u processors
+-allowed\n",
++ fprintf(stderr,"setupRtsFlags: no more than %u processors allowed\n",
+ MAX_PROC);
+ *error = rtsTrue;
+ }
diff --git a/lang/ghc5/files/extra-patch-ghc-rts-rts.conf.in b/lang/ghc5/files/extra-patch-ghc-rts-rts.conf.in
new file mode 100644
index 000000000000..d9679728b591
--- /dev/null
+++ b/lang/ghc5/files/extra-patch-ghc-rts-rts.conf.in
@@ -0,0 +1,10 @@
+--- ghc/rts/rts.conf.in.orig Thu Dec 11 15:53:05 2003
++++ ghc/rts/rts.conf.in Thu Dec 11 16:08:54 2003
+@@ -134,6 +134,7 @@
+ , "-u", "GHCziWeak_runFinalizzerBatch_closure"
+ , "-u", "__stginit_Prelude"
+ #endif
++ , "-L%%LOCALBASE%%/lib"
+ ]
+ #ifdef HAVE_FRAMEWORK_HASKELLSUPPORT
+ , extra_frameworks = [ "HaskellSupport" ]
diff --git a/lang/ghc5/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c b/lang/ghc5/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c
new file mode 100644
index 000000000000..dce9dc88c24f
--- /dev/null
+++ b/lang/ghc5/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c
@@ -0,0 +1,20 @@
+--- ghc/utils/prof/cgprof/cgprof.c.orig Thu Dec 11 11:50:34 2003
++++ ghc/utils/prof/cgprof/cgprof.c Thu Dec 11 11:51:47 2003
+@@ -1,5 +1,5 @@
+ /* ------------------------------------------------------------------------
+- * $Id: cgprof.c,v 1.1 2000/04/05 10:06:36 simonmar Exp $
++ * $Id: cgprof.c,v 1.2 2002/10/05 22:18:46 panne Exp $
+ *
+ * Copyright (C) 1995-2000 University of Oxford
+ *
+@@ -1183,8 +1183,8 @@
+ } /* end of new for loop */
+
+ *nonodes = symbol_table_next;
+- fprintf(log,"%s: read %d lines from profile.Graph contains %i nodes.
+- \n",Pgm,nolines,symbol_table_next);
++ fprintf(log,"%s: read %d lines from profile.Graph contains %i nodes.\n",
++ Pgm,nolines,symbol_table_next);
+
+ free_cc_matrix(cc_m); /* be nice and clean up the cost centre matrix */
+ }
diff --git a/lang/ghc5/pkg-plist b/lang/ghc5/pkg-plist
index 0478c8d068fa..693670d3acd8 100644
--- a/lang/ghc5/pkg-plist
+++ b/lang/ghc5/pkg-plist
@@ -819,7 +819,7 @@ lib/ghc-%%GHC_VERSION%%/libHStext_cbits.a
lib/ghc-%%GHC_VERSION%%/libHSutil.a
lib/ghc-%%GHC_VERSION%%/libHSutil_cbits.a
%%PROFILE%%lib/ghc-%%GHC_VERSION%%/libHSutil_p.a
-lib/ghc-%%GHC_VERSION%%/libgmp.a
+%%GMP%%lib/ghc-%%GHC_VERSION%%/libgmp.a
lib/ghc-%%GHC_VERSION%%/package.conf
lib/ghc-%%GHC_VERSION%%/parse-gcstats.prl
lib/ghc-%%GHC_VERSION%%/process-gcstats.prl