Commit 1d7983bd authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tell gcc on Windows where include/mingw is

We need to tell the gcc bundled with GHC on Windows where its mingw
include directory is
parent b40c41b2
......@@ -225,6 +225,7 @@ configureToolchain ghcProg =
compilerDir = takeDirectory (programPath ghcProg)
baseDir = takeDirectory compilerDir
libDir = baseDir </> "gcc-lib"
includeDir = baseDir </> "include" </> "mingw"
isWindows = case buildOS of Windows -> True; _ -> False
-- on Windows finding and configuring ghc's gcc and ld is a bit special
......@@ -239,7 +240,7 @@ configureToolchain ghcProg =
-- of programFindLocation above rather than a user-supplied path
-- that means we should add this extra flag to tell ghc's gcc
-- where it lives and thus where gcc can find its various files:
FoundOnSystem {} -> return ["-B" ++ libDir]
FoundOnSystem {} -> return ["-B" ++ libDir, "-I" ++ includeDir]
UserSpecified {} -> return []
| otherwise = \_ _ -> return []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment