Accepting request 646916 from devel:languages:haskell:ghc-8.6.x
- dont require memory-constraints on ppc archs - dropped reproducible-tmp-names.patch OBS-URL: https://build.opensuse.org/request/show/646916 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=286
This commit is contained in:
parent
cd6c352512
commit
c593f930aa
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 7 10:00:46 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- dont require memory-constraints on ppc archs
|
||||
- dropped reproducible-tmp-names.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 6 13:56:27 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
7
ghc.spec
7
ghc.spec
@ -53,7 +53,10 @@ BuildRequires: libffi48-devel
|
||||
BuildRequires: libffi-devel
|
||||
%endif
|
||||
BuildRequires: libtool
|
||||
# not resolvable on ppc
|
||||
%ifarch %{arm} %{ix86} x86_64
|
||||
BuildRequires: memory-constraints
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: xz
|
||||
@ -96,8 +99,6 @@ Patch35: ghc-pie.patch
|
||||
Patch100: ghc-8.0.2-Cabal-dynlibdir.patch
|
||||
# PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1
|
||||
Patch110: buildpath-abi-stability.patch
|
||||
# PATCH-FIX-UPSTREAM reproducible-tmp-names.patch -- debian patch for more stable abi-2
|
||||
Patch111: reproducible-tmp-names.patch
|
||||
|
||||
%description
|
||||
Haskell is the standard purely functional programming language; the
|
||||
@ -209,8 +210,6 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
|
||||
%patch35 -p1
|
||||
%patch100 -p1
|
||||
%patch110 -p1
|
||||
#%%patch111 -p1
|
||||
# Probably fixed upstream
|
||||
|
||||
%build
|
||||
# patch 1 modifies build system, we need to recreate configure
|
||||
|
@ -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.2.1.20170929/compiler/main/SysTools.hs
|
||||
===================================================================
|
||||
--- ghc-8.2.1.20170929.orig/compiler/main/SysTools.hs
|
||||
+++ ghc-8.2.1.20170929/compiler/main/SysTools.hs
|
||||
@@ -68,6 +68,7 @@ import Platform
|
||||
import Util
|
||||
import DynFlags
|
||||
import Exception
|
||||
+import Fingerprint
|
||||
|
||||
import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion)
|
||||
|
||||
@@ -1121,8 +1122,8 @@ getTempDir dflags = do
|
||||
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
|
||||
@@ -1558,6 +1559,13 @@ getProcessID :: IO Int
|
||||
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]
|
Loading…
x
Reference in New Issue
Block a user