From 46f9fd675c9ecaa4de0112c0bf73ab894d24f574 Mon Sep 17 00:00:00 2001 From: obraun Date: Tue, 16 Dec 2003 10:08:52 +0000 Subject: Use patches and libgmp port on -STABLE, too. Submitted by: Volker Stolz Approved by: maintainer --- lang/ghc/Makefile | 17 +++---------- ...extra-patch-ghc-compiler-nativeGen-MachMisc.lhs | 15 ------------ ...a-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs | 28 ---------------------- lang/ghc/files/extra-patch-ghc-rts-RtsFlags.c | 12 ---------- lang/ghc/files/extra-patch-ghc-rts-rts.conf.in | 10 -------- .../extra-patch-ghc-utils-prof-cgprof-cgprof.c | 20 ---------------- .../patch-ghc-compiler-nativeGen-MachMisc.lhs | 15 ++++++++++++ .../patch-ghc-compiler-nativeGen-RegAllocInfo.lhs | 28 ++++++++++++++++++++++ lang/ghc/files/patch-ghc-rts-RtsFlags.c | 12 ++++++++++ lang/ghc/files/patch-ghc-rts-rts.conf.in | 10 ++++++++ .../ghc/files/patch-ghc-utils-prof-cgprof-cgprof.c | 20 ++++++++++++++++ lang/ghc/pkg-plist | 1 - 12 files changed, 88 insertions(+), 100 deletions(-) delete mode 100644 lang/ghc/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs delete mode 100644 lang/ghc/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs delete mode 100644 lang/ghc/files/extra-patch-ghc-rts-RtsFlags.c delete mode 100644 lang/ghc/files/extra-patch-ghc-rts-rts.conf.in delete mode 100644 lang/ghc/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c create mode 100644 lang/ghc/files/patch-ghc-compiler-nativeGen-MachMisc.lhs create mode 100644 lang/ghc/files/patch-ghc-compiler-nativeGen-RegAllocInfo.lhs create mode 100644 lang/ghc/files/patch-ghc-rts-RtsFlags.c create mode 100644 lang/ghc/files/patch-ghc-rts-rts.conf.in create mode 100644 lang/ghc/files/patch-ghc-utils-prof-cgprof-cgprof.c (limited to 'lang/ghc') diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile index a9a65e35315f..caa3e2ede243 100644 --- a/lang/ghc/Makefile +++ b/lang/ghc/Makefile @@ -26,14 +26,10 @@ 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 +LIB_DEPENDS= gmp.6:${PORTSDIR}/math/libgmp4 + MAINTAINER= simonmar@microsoft.com COMMENT= A Compiler for the functional language Haskell @@ -54,16 +50,11 @@ PLIST_SUB+= PROFILE="" BOOT_DIR= ${WRKDIR}/ghc-${PORTVERSION}-boot BOOT_GHC= ${BOOT_DIR}/bin/i386-unknown-freebsd/ghc-${PORTVERSION} -CONFIGURE_ARGS= --with-ghc=${BOOT_GHC} +CONFIGURE_ARGS= --with-ghc=${BOOT_GHC} --with-gcc=${CC} # 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. @@ -83,9 +74,7 @@ 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; \ diff --git a/lang/ghc/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs b/lang/ghc/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs deleted file mode 100644 index a196c68cf817..000000000000 --- a/lang/ghc/files/extra-patch-ghc-compiler-nativeGen-MachMisc.lhs +++ /dev/null @@ -1,15 +0,0 @@ ---- 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/ghc/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs b/lang/ghc/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs deleted file mode 100644 index d8862dafbf78..000000000000 --- a/lang/ghc/files/extra-patch-ghc-compiler-nativeGen-RegAllocInfo.lhs +++ /dev/null @@ -1,28 +0,0 @@ ---- 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/ghc/files/extra-patch-ghc-rts-RtsFlags.c b/lang/ghc/files/extra-patch-ghc-rts-RtsFlags.c deleted file mode 100644 index abd3496f68f2..000000000000 --- a/lang/ghc/files/extra-patch-ghc-rts-RtsFlags.c +++ /dev/null @@ -1,12 +0,0 @@ ---- 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/ghc/files/extra-patch-ghc-rts-rts.conf.in b/lang/ghc/files/extra-patch-ghc-rts-rts.conf.in deleted file mode 100644 index d9679728b591..000000000000 --- a/lang/ghc/files/extra-patch-ghc-rts-rts.conf.in +++ /dev/null @@ -1,10 +0,0 @@ ---- 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/ghc/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c b/lang/ghc/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c deleted file mode 100644 index dce9dc88c24f..000000000000 --- a/lang/ghc/files/extra-patch-ghc-utils-prof-cgprof-cgprof.c +++ /dev/null @@ -1,20 +0,0 @@ ---- 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/ghc/files/patch-ghc-compiler-nativeGen-MachMisc.lhs b/lang/ghc/files/patch-ghc-compiler-nativeGen-MachMisc.lhs new file mode 100644 index 000000000000..a196c68cf817 --- /dev/null +++ b/lang/ghc/files/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/ghc/files/patch-ghc-compiler-nativeGen-RegAllocInfo.lhs b/lang/ghc/files/patch-ghc-compiler-nativeGen-RegAllocInfo.lhs new file mode 100644 index 000000000000..d8862dafbf78 --- /dev/null +++ b/lang/ghc/files/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/ghc/files/patch-ghc-rts-RtsFlags.c b/lang/ghc/files/patch-ghc-rts-RtsFlags.c new file mode 100644 index 000000000000..abd3496f68f2 --- /dev/null +++ b/lang/ghc/files/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/ghc/files/patch-ghc-rts-rts.conf.in b/lang/ghc/files/patch-ghc-rts-rts.conf.in new file mode 100644 index 000000000000..d9679728b591 --- /dev/null +++ b/lang/ghc/files/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/ghc/files/patch-ghc-utils-prof-cgprof-cgprof.c b/lang/ghc/files/patch-ghc-utils-prof-cgprof-cgprof.c new file mode 100644 index 000000000000..dce9dc88c24f --- /dev/null +++ b/lang/ghc/files/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/ghc/pkg-plist b/lang/ghc/pkg-plist index 693670d3acd8..83b326a862ab 100644 --- a/lang/ghc/pkg-plist +++ b/lang/ghc/pkg-plist @@ -819,7 +819,6 @@ 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 -%%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 -- cgit