diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-02-10 11:54:29 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-10 11:54:29 +0000 |
commit | 522d43089adf45cf9502991082f136208fc2cef8 (patch) | |
tree | 64aa50b36ce858514b0f08bcf3f33a65018cb86c /testing/ghc/0004-reproducible-tmp-names.patch | |
parent | c300e67286337679a0a3e732204fcedd5b41b424 (diff) | |
download | aports-522d43089adf45cf9502991082f136208fc2cef8.tar.bz2 aports-522d43089adf45cf9502991082f136208fc2cef8.tar.xz |
Revert "testing/ghc: new aport"
This reverts commit cf0b33112cd566332be4376233f1c297f03255e7.
Diffstat (limited to 'testing/ghc/0004-reproducible-tmp-names.patch')
-rw-r--r-- | testing/ghc/0004-reproducible-tmp-names.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/testing/ghc/0004-reproducible-tmp-names.patch b/testing/ghc/0004-reproducible-tmp-names.patch deleted file mode 100644 index a0417f145d..0000000000 --- a/testing/ghc/0004-reproducible-tmp-names.patch +++ /dev/null @@ -1,43 +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. - -Instead of using the process id, create a hash from the command line arguments, -and assume that is going to be unique. - -Index: ghc/compiler/main/SysTools.hs -=================================================================== ---- ghc.orig/compiler/main/SysTools.hs 2016-04-23 17:57:12.812255430 +0200 -+++ ghc/compiler/main/SysTools.hs 2016-04-23 17:57:12.808255337 +0200 -@@ -65,6 +65,7 @@ - import Util - import DynFlags - import Exception -+import Fingerprint - - import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion) - -@@ -1158,8 +1159,8 @@ - mapping <- readIORef dir_ref - case Map.lookup tmp_dir mapping of - Nothing -> do -- pid <- getProcessID -- let prefix = tmp_dir </> "ghc" ++ show pid ++ "_" -+ pid <- getStableProcessID -+ let prefix = tmp_dir </> "ghc" ++ pid ++ "_" - mask_ $ mkTempDir prefix - Just dir -> return dir - where -@@ -1575,6 +1576,13 @@ - getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral - #endif - -+-- Debian-specific hack to get reproducible output, by not using the "random" -+-- pid, but rather something determinisic -+getStableProcessID :: IO String -+getStableProcessID = do -+ args <- getArgs -+ return $ take 4 $ show $ fingerprintString $ unwords args -+ - -- Divvy up text stream into lines, taking platform dependent - -- line termination into account. - linesPlatform :: String -> [String] |