OSX: Avoid using external hash programs, since SIGILL is not fun
This commit is contained in:
parent
2f7795e9cd
commit
1118247394
2 changed files with 13 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
||||||
{- Checks system configuration and generates SysConfig.hs. -}
|
{- Checks system configuration and generates SysConfig.hs. -}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Build.Configure where
|
module Build.Configure where
|
||||||
|
|
||||||
import System.Directory
|
import System.Directory
|
||||||
|
@ -53,8 +55,8 @@ tests =
|
||||||
, (384, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b")
|
, (384, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b")
|
||||||
]
|
]
|
||||||
|
|
||||||
{- shaNsum are the program names used by coreutils. Some systems like OSX
|
{- shaNsum are the program names used by coreutils. Some systems
|
||||||
- sometimes install these with 'g' prefixes.
|
- install these with 'g' prefixes.
|
||||||
-
|
-
|
||||||
- On some systems, shaN is used instead, but on other
|
- On some systems, shaN is used instead, but on other
|
||||||
- systems, it might be "hashalot", which does not produce
|
- systems, it might be "hashalot", which does not produce
|
||||||
|
@ -74,13 +76,13 @@ shaTestCases l = map make l
|
||||||
then return $ Just c
|
then return $ Just c
|
||||||
else search cmds
|
else search cmds
|
||||||
|
|
||||||
shacmds n = concatMap (\x -> [x, 'g':x, osxpath </> x]) $
|
#ifndef darwin_HOST_OS
|
||||||
|
shacmds n = concatMap (\x -> [x, 'g':x]) $
|
||||||
map (\x -> "sha" ++ show n ++ x) ["sum", ""]
|
map (\x -> "sha" ++ show n ++ x) ["sum", ""]
|
||||||
|
#else
|
||||||
{- Max OSX sometimes puts GNU tools outside PATH, so look in
|
-- OSX has had problems with gsha*sum crashing, so do not use.
|
||||||
- the location it uses, and remember where to run them
|
shacmds _ = []
|
||||||
- from. -}
|
#endif
|
||||||
osxpath = "/opt/local/libexec/gnubin"
|
|
||||||
|
|
||||||
tmpDir :: String
|
tmpDir :: String
|
||||||
tmpDir = "tmp"
|
tmpDir = "tmp"
|
||||||
|
|
|
@ -78,3 +78,6 @@ Everything up-to-date
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
I can send you the crash report of hsha256sum if you need it.
|
I can send you the crash report of hsha256sum if you need it.
|
||||||
|
|
||||||
|
> Fine, we'll stop using this on OSX, since git-annex has its own builtin
|
||||||
|
> and not even much slower hashers. [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue