git.iko.soy/typeable/entropy
on main help sign in
Revert "Try to fix cc detection"

This reverts commit f0044cc163584c7dfd37ad04f11d7ede2f715296.

commite072eb4182f0b4facb61c94353adfa5b4cb7b3ce authorThomas M. DuBuisson <tommd@galois.com> dateTue 24 Sep 2013, 10:59 (13 years ago) parentf0044cc
2 files changed+8−13
Setup.hs+2−7 System/Entropy.hs+6−6
Setup.hs+2−7
@@ -1,4 +1,3 @@
1−import Control.Monad
21import Distribution.Simple
32import Distribution.Simple.LocalBuildInfo
43import Distribution.Simple.Setup
@@ -14,13 +13,10 @@ import System.Exit
1413main = defaultMainWithHooks hk
1514 where
1615 hk = simpleUserHooks { buildHook = \pd lbi uh bf -> do
17− let ccProg0 = Program "gcc" undefined undefined undefined
18− ccProg1 = Program "clang" undefined undefined undefined
19− f x = lookupProgram x (withPrograms lbi)
20− mConf = f ccProg0 `mplus` f ccProg1
16+ let ccProg = Program "gcc" undefined undefined undefined
17+ mConf = lookupProgram ccProg (withPrograms lbi)
2118 err = error "Could not determine C compiler"
2219 cc = locationPath . programLocation . maybe err id $ mConf
23− print (withPrograms lbi)
2420 b <- canUseRDRAND cc
2521 let newWithPrograms1 = userSpecifyArgs "gcc" cArgs (withPrograms lbi)
2622 newWithPrograms = userSpecifyArgs "ghc" cArgsHC newWithPrograms1
@@ -37,7 +33,6 @@ cArgsHC = map ("-optc" ++) cArgs
3733canUseRDRAND :: FilePath -> IO Bool
3834canUseRDRAND cc = do
3935 withTempDirectory normal "" "testRDRAND" $ \tmpDir -> do
40− -- withTempDirectory normal False "" "testRDRAND" $ \tmpDir -> do
4136 writeFile (tmpDir ++ "/testRDRAND.c")
4237 (unlines [ "#include <stdint.h>"
4338 , "int main() {"
System/Entropy.hs+6−6
@@ -9,12 +9,12 @@
99-}
1010
1111module System.Entropy
12− ( getEntropy
13− , CryptHandle
14− , openHandle
15− , hGetEntropy
16− , closeHandle
17− ) where
12+ ( getEntropy
13+ , CryptHandle
14+ , openHandle
15+ , hGetEntropy
16+ , closeHandle
17+ ) where
1818
1919import Control.Monad (liftM)
2020import Data.ByteString as B