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

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


Wed Feb 10 11:19:32 UTC 2010  Kari Pahula <kaol at debian.org>
  * Import of ghc6_6.12.1-8.dsc

    M ./changelog +16
    M ./control -1 +1
    M ./patches/alpha-tcforeign -17 +82
    A ./patches/haddock-hardcode-ghc-paths
    A ./patches/haddock-no-irrefutable-docname
    M ./patches/series +2
    M ./rules -4 +3

Wed Feb 10 11:19:32 UTC 2010  Kari Pahula <kaol at debian.org>
  * Import of ghc6_6.12.1-8.dsc
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2011-01-15 06:07:42.373328616 +0000
+++ new-ghc/changelog	2011-01-15 06:07:42.433331776 +0000
@@ -1,3 +1,19 @@
+ghc6 (6.12.1-8) unstable; urgency=low
+
+  * Use tabs instead of 8 spaces in debian/rules for ia64 specific flags.
+
+ -- Kari Pahula <kaol at debian.org>  Wed, 10 Feb 2010 13:19:32 +0200
+
+ghc6 (6.12.1-7) unstable; urgency=low
+
+  * Include patches to haddock to ghc6's own patches and don't apply them
+    in debian/rules.
+  * Update the patch for alpha.
+  * ghc6-doc depends on ghc6 (>= ${binary:Version}), not haddock.
+  * Upload to unstable.
+
+ -- Kari Pahula <kaol at debian.org>  Tue, 09 Feb 2010 23:45:14 +0200
+
 ghc6 (6.12.1-6) experimental; urgency=low
 
   * Use some more compiler flags to make ghc6 build on ia64 for real.
diff -rN -u old-ghc/control new-ghc/control
--- old-ghc/control	2011-01-15 06:07:42.373328616 +0000
+++ new-ghc/control	2011-01-15 06:07:42.433331776 +0000
@@ -47,7 +47,7 @@
 Architecture: all
 Suggests: haskell-doc
 Provides: ${provided-docs}
-Depends: haddock, ${misc:Depends}
+Depends: ghc6 (>= ${binary:Version}), ${misc:Depends}
 Description: Documentation for the Glasgow Haskell Compilation system
  Version 6 of the Glorious Glasgow Haskell Compilation system (GHC).  GHC is
  a compiler for Haskell98.
diff -rN -u old-ghc/patches/alpha-tcforeign new-ghc/patches/alpha-tcforeign
--- old-ghc/patches/alpha-tcforeign	2011-01-15 06:07:42.373328616 +0000
+++ new-ghc/patches/alpha-tcforeign	2011-01-15 06:07:42.409330512 +0000
@@ -1,28 +1,61 @@
 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
++++ ghc6-6.12.1/compiler/typecheck/TcForeign.lhs	2010-02-09 16:01:06.000000000 +0200
+@@ -30,10 +30,6 @@
+ import ForeignCall
+ import ErrUtils
+ import Id
+-#if alpha_TARGET_ARCH
+-import Type
+-import SMRep
+-#endif
  import Name
  import TcType
-@@ -192,7 +193,7 @@
-   where
-     integral_args = sum [ (widthInBytes . argMachRep . primRepToCgRep) prim_rep
- 			| prim_rep <- map typePrimRep arg_tys,
+ 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 ]
-+			  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 ()
+-    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.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
++++ ghc6-6.12.1/rts/eventlog/EventLog.c	2010-02-09 16:01:35.000000000 +0200
 @@ -83,7 +83,7 @@
  
  static void postEventType(EventsBuf *eb, EventType *et);
@@ -44,7 +77,7 @@
  
 -    size = vsnprintf(buf,BUF,msg,ap);
 +    if (ap != NULL)
-+        size = vsnprintf(buf,BUF,msg,ap);
++        size = vsnprintf(buf,BUF,msg,*ap);
 +    else
 +        size = snprintf(buf,BUF,msg);
 +
@@ -67,3 +100,35 @@
  }
  
  void postUserMsg(Capability *cap, char *msg)
+Index: ghc6-6.12.1/rts/Trace.c
+===================================================================
+--- ghc6-6.12.1.orig/rts/Trace.c	2010-02-09 16:02:07.000000000 +0200
++++ ghc6-6.12.1/rts/Trace.c	2010-02-09 16:03:03.000000000 +0200
+@@ -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/haddock-hardcode-ghc-paths new-ghc/patches/haddock-hardcode-ghc-paths
--- old-ghc/patches/haddock-hardcode-ghc-paths	1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/haddock-hardcode-ghc-paths	2011-01-15 06:07:42.385329248 +0000
@@ -0,0 +1,34 @@
+Index: ghc6-6.12.1/utils/haddock/haddock.cabal
+===================================================================
+--- ghc6-6.12.1.orig/utils/haddock/haddock.cabal	2010-02-09 12:30:41.000000000 +0200
++++ ghc6-6.12.1/utils/haddock/haddock.cabal	2010-02-09 12:31:40.000000000 +0200
+@@ -77,8 +77,6 @@
+   if flag(in-ghc-tree)
+     cpp-options: -DIN_GHC_TREE
+     extensions: ForeignFunctionInterface
+-  else
+-    build-depends: ghc-paths
+ 
+   main-is:              Main.hs
+   hs-source-dirs:       src
+Index: ghc6-6.12.1/utils/haddock/src/Main.hs
+===================================================================
+--- ghc6-6.12.1.orig/utils/haddock/src/Main.hs	2010-02-09 12:30:51.000000000 +0200
++++ ghc6-6.12.1/utils/haddock/src/Main.hs	2010-02-09 12:32:35.000000000 +0200
+@@ -50,7 +50,6 @@
+ #ifdef IN_GHC_TREE
+ import System.FilePath
+ #else
+-import GHC.Paths
+ import Paths_haddock
+ #endif
+ 
+@@ -348,7 +347,7 @@
+ #ifdef IN_GHC_TREE
+       getInTreeLibDir
+ #else
+-      return libdir -- from GHC.Paths
++      return "/usr/lib/ghc- at PROJECTVERSION@/"
+ #endif
+     xs -> return $ last xs
+ 
diff -rN -u old-ghc/patches/haddock-no-irrefutable-docname new-ghc/patches/haddock-no-irrefutable-docname
--- old-ghc/patches/haddock-no-irrefutable-docname	1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/haddock-no-irrefutable-docname	2011-01-15 06:07:42.381329037 +0000
@@ -0,0 +1,25 @@
+Index: ghc6-6.12.1/utils/haddock/src/Haddock/Backends/Html.hs
+===================================================================
+--- ghc6-6.12.1.orig/utils/haddock/src/Haddock/Backends/Html.hs	2010-02-09 12:27:23.000000000 +0200
++++ ghc6-6.12.1/utils/haddock/src/Haddock/Backends/Html.hs	2010-02-09 12:29:30.000000000 +0200
+@@ -1855,7 +1855,7 @@
+           case maybe_wiki_url of
+             Nothing  -> Html.emptyTable
+             Just url -> tda [theclass "declbut"] <<
+-                          let url' = spliceURL (Just fname) (Just mdl)
++                          let url' = spliceURL (Just fname) mdl
+                                                (Just n) (Just loc) url
+                            in anchor ! [href url'] << toHtml "Comments"
+   
+@@ -1865,8 +1865,9 @@
+         -- the module defining the type family, which is wrong.
+         origMod = nameModule n
+ 
+-        -- Name must be documented, otherwise we wouldn't get here
+-        Documented n mdl = name
++        (n,mdl) = case name of
++                    Documented n' mdl' -> (n', Just mdl')
++                    Undocumented n' -> (n', Nothing)
+ 
+         fname = unpackFS (srcSpanFile loc)
+ 
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2011-01-15 06:07:42.369328405 +0000
+++ new-ghc/patches/series	2011-01-15 06:07:42.433331776 +0000
@@ -4,3 +4,5 @@
 kfreebsd-_gnu_source-565818
 getallinfo-nothing-ghci-566331
 alpha-tcforeign
+haddock-no-irrefutable-docname
+haddock-hardcode-ghc-paths
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules	2011-01-15 06:07:42.369328405 +0000
+++ new-ghc/rules	2011-01-15 06:07:42.433331776 +0000
@@ -45,9 +45,9 @@
 	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
+	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"
@@ -112,7 +112,6 @@
 
 # build haddock separately and hard code paths according to install paths
 	cp -r utils/haddock debian
-	cd debian/haddock; cat ../patches.haddock/series | xargs -IX cat ../patches.haddock/X | patch -p1
 	sed -i s/@PROJECTVERSION@/$(ProjectVersion)/ debian/haddock/src/Main.hs
 	cd debian/haddock; ../../inplace/bin/ghc-stage2 --make Setup.lhs; ./Setup configure --prefix=/usr --with-compiler=../../inplace/bin/ghc-stage2 --package-db=../../inplace/lib/package.conf.d/; ./Setup build
 





More information about the Pkg-haskell-commits mailing list