remove reproducible-tmp-names.patch

seems deprecated for 8.4 (not in debian)
This commit is contained in:
Jens Petersen 2018-10-16 22:27:51 +09:00
parent fb6e70e30b
commit da1c217540
2 changed files with 0 additions and 45 deletions

View File

@ -65,7 +65,6 @@ Patch15: ghc-8.4.3-warnings.mk-test.patch
# Debian patches:
Patch24: buildpath-abi-stability.patch
Patch26: no-missing-haddock-file-warning.patch
Patch27: reproducible-tmp-names.patch
Patch28: x32-use-native-x86_64-insn.patch
Patch29: llvm-targets-Add-versioned-ARM-targets.patch
Patch30: fix-build-using-unregisterized-v8.2.patch
@ -284,7 +283,6 @@ rm -r libffi-tarballs
%patch24 -p1 -b .orig
%patch26 -p1 -b .orig
#%%patch27 -p1 -b .orig
%patch28 -p1 -b .orig
%ifarch armv7hl
%patch29 -p1 -b .orig

View File

@ -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-8.0.2/compiler/main/SysTools.hs
===================================================================
--- ghc-8.0.2.orig/compiler/main/SysTools.hs
+++ ghc-8.0.2/compiler/main/SysTools.hs
@@ -65,6 +65,7 @@
import Util
import DynFlags
import Exception
+import Fingerprint
import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion)
@@ -1145,8 +1146,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
@@ -1562,6 +1563,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]