[Pkg-haskell-commits] darcs: ghc: Import of ghc6_6.12.1-6.dsc

Kari Pahula kaol at debian.org
Sat Jan 15 06:07:41 UTC 2011


Mon Feb  8 11:58:59 UTC 2010  Kari Pahula <kaol at debian.org>
  * Import of ghc6_6.12.1-6.dsc

    M ./changelog +7
    A ./patches/alpha-tcforeign
    M ./patches/series +1
    M ./rules +5

Mon Feb  8 11:58:59 UTC 2010  Kari Pahula <kaol at debian.org>
  * Import of ghc6_6.12.1-6.dsc
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2011-01-15 06:07:41.009256778 +0000
+++ new-ghc/changelog	2011-01-15 06:07:41.077260359 +0000
@@ -1,3 +1,10 @@
+ghc6 (6.12.1-6) experimental; urgency=low
+
+  * Use some more compiler flags to make ghc6 build on ia64 for real.
+  * Patch TcForeign.lhs and EventLog.c to make ghc6 build on alpha.
+
+ -- Kari Pahula <kaol at debian.org>  Mon, 08 Feb 2010 13:58:59 +0200
+
 ghc6 (6.12.1-5) experimental; urgency=low
 
   * Included haddock with the ghc6 package.  Provides, conflicts and
diff -rN -u old-ghc/patches/alpha-tcforeign new-ghc/patches/alpha-tcforeign
--- old-ghc/patches/alpha-tcforeign	1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/alpha-tcforeign	2011-01-15 06:07:41.077260359 +0000
@@ -0,0 +1,69 @@
+Index: ghc6-6.12.1/compiler/typecheck/TcForeign.lhs
+===================================================================
+--- ghc6-6.12.1.orig/compiler/typecheck/TcForeign.lhs	2010-02-06 12:41:37.000000000 +0200
++++ ghc6-6.12.1/compiler/typecheck/TcForeign.lhs	2010-02-06 13:26:02.000000000 +0200
+@@ -33,6 +33,7 @@
+ #if alpha_TARGET_ARCH
+ import Type
+ import SMRep
++import CmmExpr
+ #endif
+ import Name
+ import TcType
+@@ -192,7 +193,7 @@
+   where
+     integral_args = sum [ (widthInBytes . argMachRep . primRepToCgRep) prim_rep
+ 			| prim_rep <- map typePrimRep arg_tys,
+-			  primRepHint prim_rep /= FloatHint ]
++			  not $ prim_rep == FloatRep || prim_rep == DoubleRep ]
+     err = ptext (sLit "On Alpha, I can only handle 32 bytes of non-floating-point arguments to foreign export dynamic")
+ #else
+ checkFEDArgs _ = return ()
+Index: ghc6-6.12.1/rts/eventlog/EventLog.c
+===================================================================
+--- ghc6-6.12.1.orig/rts/eventlog/EventLog.c	2010-02-08 13:55:22.000000000 +0200
++++ ghc6-6.12.1/rts/eventlog/EventLog.c	2010-02-08 14:25:27.000000000 +0200
+@@ -83,7 +83,7 @@
+ 
+ static void postEventType(EventsBuf *eb, EventType *et);
+ 
+-static void postLogMsg(EventsBuf *eb, EventTypeNum type, char *msg, va_list ap);
++static void postLogMsg(EventsBuf *eb, EventTypeNum type, char *msg, va_list *ap);
+ 
+ static void postBlockMarker(EventsBuf *eb);
+ static void closeBlockMarker(EventsBuf *ebuf);
+@@ -395,12 +395,16 @@
+ 
+ #define BUF 512
+ 
+-void postLogMsg(EventsBuf *eb, EventTypeNum type, char *msg, va_list ap)
++void postLogMsg(EventsBuf *eb, EventTypeNum type, char *msg, va_list *ap)
+ {
+     char buf[BUF];
+     nat size;
+ 
+-    size = vsnprintf(buf,BUF,msg,ap);
++    if (ap != NULL)
++        size = vsnprintf(buf,BUF,msg,ap);
++    else
++        size = snprintf(buf,BUF,msg);
++
+     if (size > BUF) {
+         buf[BUF-1] = '\0';
+         size = BUF;
+@@ -419,13 +423,13 @@
+ void postMsg(char *msg, va_list ap)
+ {
+     ACQUIRE_LOCK(&eventBufMutex);
+-    postLogMsg(&eventBuf, EVENT_LOG_MSG, msg, ap);
++    postLogMsg(&eventBuf, EVENT_LOG_MSG, msg, &ap);
+     RELEASE_LOCK(&eventBufMutex);
+ }
+ 
+ void postCapMsg(Capability *cap, char *msg, va_list ap)
+ {
+-    postLogMsg(&capEventBuf[cap->no], EVENT_LOG_MSG, msg, ap);
++    postLogMsg(&capEventBuf[cap->no], EVENT_LOG_MSG, msg, &ap);
+ }
+ 
+ void postUserMsg(Capability *cap, char *msg)
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2011-01-15 06:07:41.009256778 +0000
+++ new-ghc/patches/series	2011-01-15 06:07:41.077260359 +0000
@@ -3,3 +3,4 @@
 use-debian-gen_contents_index
 kfreebsd-_gnu_source-565818
 getallinfo-nothing-ghci-566331
+alpha-tcforeign
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules	2011-01-15 06:07:41.009256778 +0000
+++ new-ghc/rules	2011-01-15 06:07:41.077260359 +0000
@@ -44,6 +44,11 @@
 ifeq (powerpc,$(DEB_HOST_ARCH)) # See #365497
 	echo "GhcWithInterpreter=NO" >> mk/build.mk
 endif
+ifeq (ia64,$(DEB_HOST_ARCH)) # Tested and seen to be necessary with 6.12.1
+        echo "SRC_CC_OPTS += -Wl,--relax" >> mk/build.mk
+        echo "SRC_HC_OPTS += -optl-Wl,--relax -optl-Wl,-G0" >> mk/build.mk
+        echo "SRC_HC_OPTS += -optc-G0" >> mk/build.mk
+endif
 ifneq (,$(findstring $(DEB_HOST_ARCH), kfreebsd-i386 kfreebsd-amd64))
 	echo "GhcWithInterpreter=YES"
 endif





More information about the Pkg-haskell-commits mailing list