diff options
Diffstat (limited to 'utils/deriveConstants/Main.hs')
-rw-r--r-- | utils/deriveConstants/Main.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs index 5a227fb63f..8d3a6798c0 100644 --- a/utils/deriveConstants/Main.hs +++ b/utils/deriveConstants/Main.hs @@ -10,7 +10,7 @@ into non-C source containing this information. We want to get information about code generated by the C compiler, such as the sizes of types, and offsets of struct fields. We need this because the layout of certain runtime objects is defined in C -headers (e.g. includes/rts/storage/Closures.h), but we need access to +headers (e.g. rts/include/rts/storage/Closures.h), but we need access to the layout of these structures from a Haskell program (GHC). One way to do this is to compile and run a C program that includes the @@ -46,15 +46,15 @@ main = do opts <- parseArgs Nothing -> die ("No " ++ descr ++ " given") mode <- getOption "mode" o_mode fn <- getOption "output filename" o_outputFilename - os <- getOption "target os" o_targetOS - - let haskellWanteds = [ what | (wh, what) <- wanteds os - , wh `elem` [Haskell, Both] ] case mode of - Gen_Haskell_Type -> writeHaskellType fn haskellWanteds + Gen_Haskell_Type -> + writeHaskellType fn + [ what | (wh, what) <- wanteds "OS must not matter" + , wh `elem` [Haskell, Both] ] Gen_Computed cm -> - do tmpdir <- getOption "tmpdir" o_tmpdir + do os <- getOption "target os" o_targetOS + tmpdir <- getOption "tmpdir" o_tmpdir gccProg <- getOption "gcc program" o_gccProg nmProg <- getOption "nm program" o_nmProg let verbose = o_verbose opts @@ -715,7 +715,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram "#define PROFILING", "#define THREADED_RTS", "", - "#include \"PosixSource.h\"", + "#include \"rts/PosixSource.h\"", "#include \"Rts.h\"", "#include \"StableName.h\"", "#include \"Capability.h\"", |