[Pkg-haskell-commits] darcs: ghc: A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.

Joachim Breitner mail at joachim-breitner.de
Mon May 25 10:07:27 UTC 2015


Mon May 25 09:06:45 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.

    M! ./patches/reproducible-tmp-names -30
    M! ./patches/series -4

Mon May 25 09:06:45 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.
diff -rN -u old-ghc/patches/reproducible-tmp-names new-ghc/patches/reproducible-tmp-names
--- old-ghc/patches/reproducible-tmp-names	2015-05-25 10:06:59.158500436 +0000
+++ new-ghc/patches/reproducible-tmp-names	2015-05-25 10:06:59.178500938 +0000
@@ -1,30 +0,0 @@
-This is an attempt to make GHC build reproducible. The name of .c files may end
-up in the resulting binary (in the debug section), but not the directory.
-
-Since the temporary directory already contains the process id, there is no need
-to put it into the filename as well.
-
-Index: ghc-7.10.1/compiler/main/SysTools.hs
-===================================================================
---- ghc-7.10.1.orig/compiler/main/SysTools.hs	2015-03-21 23:30:07.000000000 +0100
-+++ ghc-7.10.1/compiler/main/SysTools.hs	2015-05-24 10:45:40.537513384 +0200
-@@ -1072,8 +1072,7 @@
- newTempName :: DynFlags -> Suffix -> IO FilePath
- newTempName dflags extn
-   = do d <- getTempDir dflags
--       x <- getProcessID
--       findTempName (d </> "ghc" ++ show x ++ "_")
-+       findTempName (d </> "ghc_")
-   where
-     findTempName :: FilePath -> IO FilePath
-     findTempName prefix
-@@ -1088,8 +1087,7 @@
- newTempLibName :: DynFlags -> Suffix -> IO (FilePath, FilePath, String)
- newTempLibName dflags extn
-   = do d <- getTempDir dflags
--       x <- getProcessID
--       findTempName d ("ghc" ++ show x ++ "_")
-+       findTempName d ("ghc_")
-   where
-     findTempName :: FilePath -> String -> IO (FilePath, FilePath, String)
-     findTempName dir prefix
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2015-05-25 10:06:59.158500436 +0000
+++ new-ghc/patches/series	2015-05-25 10:06:59.178500938 +0000
@@ -3,7 +3,3 @@
 no-missing-haddock-file-warning
 hurd.diff
 ghc-7.8.4-3-aarch64.patch
-ARM-barriers.patch
-PPC-relocations.patch
-buildpath-abi-stability.patch
-reproducible-tmp-names




More information about the Pkg-haskell-commits mailing list