Skip to content

Commit

Permalink
Tell gcc on Windows where include/mingw is
Browse files Browse the repository at this point in the history
We need to tell the gcc bundled with GHC on Windows where its mingw
include directory is
  • Loading branch information
igfoo committed Sep 18, 2008
1 parent b40c41b commit 1d7983b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Distribution/Simple/GHC.hs
Expand Up @@ -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
Expand All @@ -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 []

Expand Down

0 comments on commit 1d7983b

Please sign in to comment.