[Pkg-haskell-commits] darcs: ghc: Remove patch alpha-tcforeign

Joachim Breitner mail at joachim-breitner.de
Sat Jan 15 07:12:59 UTC 2011


Sat Jan 15 07:05:28 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Remove patch alpha-tcforeign
  Ignore-this: 862afde8477d67c40daf3827acf83a2d
  
  A large chunk of the patch seems to be applied by upstream by now, so I am
  assuming that the rest of the patch can go as well. This is to be checked when
  we try building ghc on alpha. Possibly, the patch needs to be resurrected from
  Darcs.

    R ./patches/alpha-tcforeign
    M ./patches/series -1

Sat Jan 15 07:05:28 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Remove patch alpha-tcforeign
  Ignore-this: 862afde8477d67c40daf3827acf83a2d
  
  A large chunk of the patch seems to be applied by upstream by now, so I am
  assuming that the rest of the patch can go as well. This is to be checked when
  we try building ghc on alpha. Possibly, the patch needs to be resurrected from
  Darcs.
diff -rN -u old-ghc/patches/alpha-tcforeign new-ghc/patches/alpha-tcforeign
--- old-ghc/patches/alpha-tcforeign	2011-01-15 07:12:59.535606370 +0000
+++ new-ghc/patches/alpha-tcforeign	1970-01-01 00:00:00.000000000 +0000
@@ -1,134 +0,0 @@
-Index: ghc6-6.12.3/compiler/typecheck/TcForeign.lhs
-===================================================================
---- ghc6-6.12.3.orig/compiler/typecheck/TcForeign.lhs	2010-07-17 16:13:18.000000000 +0300
-+++ ghc6-6.12.3/compiler/typecheck/TcForeign.lhs	2010-07-17 16:14:17.000000000 +0300
-@@ -30,10 +30,6 @@
- import ForeignCall
- import ErrUtils
- import Id
--#if alpha_TARGET_ARCH
--import Type
--import SMRep
--#endif
- import Name
- import TcType
- import DynFlags
-@@ -113,7 +109,6 @@
-         [arg1_ty] -> do checkForeignArgs isFFIExternalTy arg1_tys
-                         checkForeignRes nonIOok  isFFIExportResultTy res1_ty
-                         checkForeignRes mustBeIO isFFIDynResultTy    res_ty
--                        checkFEDArgs arg1_tys
-                   where
-                      (arg1_tys, res1_ty) = tcSplitFunTys arg1_ty
-         _ -> addErrTc (illegalForeignTyErr empty sig_ty)
-@@ -173,30 +168,8 @@
-   = addWarn (ptext (sLit "possible missing & in foreign import of FunPtr"))
-   | otherwise
-   = return ()
--\end{code}
--
--On an Alpha, with foreign export dynamic, due to a giant hack when
--building adjustor thunks, we only allow 4 integer arguments with
--foreign export dynamic (i.e., 32 bytes of arguments after padding each
--argument to a quadword, excluding floating-point arguments).
--
--The check is needed for both via-C and native-code routes
--
--\begin{code}
- #include "nativeGen/NCG.h"
- 
--checkFEDArgs :: [Type] -> TcM ()
--#if alpha_TARGET_ARCH
--checkFEDArgs arg_tys
--  = check (integral_args <= 32) err
--  where
--    integral_args = sum [ (widthInBytes . argMachRep . primRepToCgRep) prim_rep
--			| prim_rep <- map typePrimRep arg_tys,
--			  primRepHint prim_rep /= FloatHint ]
--    err = ptext (sLit "On Alpha, I can only handle 32 bytes of non-floating-point arguments to foreign export dynamic")
--#else
--checkFEDArgs _ = return ()
--#endif
- \end{code}
- 
- 
-Index: ghc6-6.12.3/rts/eventlog/EventLog.c
-===================================================================
---- ghc6-6.12.3.orig/rts/eventlog/EventLog.c	2010-07-17 16:13:58.000000000 +0300
-+++ ghc6-6.12.3/rts/eventlog/EventLog.c	2010-07-17 16:14:17.000000000 +0300
-@@ -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);
-@@ -399,12 +399,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;
-@@ -423,13 +427,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, va_list ap)
-Index: ghc6-6.12.3/rts/Trace.c
-===================================================================
---- ghc6-6.12.3.orig/rts/Trace.c	2010-07-17 16:14:15.000000000 +0300
-+++ ghc6-6.12.3/rts/Trace.c	2010-07-17 16:14:17.000000000 +0300
-@@ -218,13 +218,16 @@
- }
- 
- #ifdef DEBUG
--static void traceCap_stderr(Capability *cap, char *msg, va_list ap)
-+static void traceCap_stderr(Capability *cap, char *msg, va_list *ap)
- {
-     ACQUIRE_LOCK(&trace_utx);
- 
-     tracePreface();
-     debugBelch("cap %2d: ", cap->no);
--    vdebugBelch(msg,ap);
-+    if(ap != NULL)
-+        vdebugBelch(msg,*ap);
-+    else
-+        debugBelch("\n");
-     debugBelch("\n");
- 
-     RELEASE_LOCK(&trace_utx);
-@@ -238,7 +241,7 @@
-     
- #ifdef DEBUG
-     if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
--        traceCap_stderr(cap, msg, ap);
-+        traceCap_stderr(cap, msg, &ap);
-     } else
- #endif
-     {
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2011-01-15 07:12:59.535606370 +0000
+++ new-ghc/patches/series	2011-01-15 07:12:59.563607844 +0000
@@ -2,7 +2,6 @@
 panic-debian-message
 kfreebsd-_gnu_source-565818
 getallinfo-nothing-ghci-566331
-alpha-tcforeign
 haddock-no-irrefutable-docname
 haddock-hardcode-ghc-paths
 ghc-6.12.3-ia64-fixed-relax





More information about the Pkg-haskell-commits mailing list