summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-09-18 14:33:12 +0000
committerIan Lynagh <igloo@earth.li>2008-09-18 14:33:12 +0000
commitc9bf1a2ccbf93198488b1446977e50b0a5f6ecf5 (patch)
tree05bc9c847e90b782b0a608904d7c246aa292a02a /compiler
parent371fe43219d9dbc6faf15d01ea921a40294e181e (diff)
downloadhaskell-c9bf1a2ccbf93198488b1446977e50b0a5f6ecf5.tar.gz
When passing gcc -B, also tell it where the mingw include directory is
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/SysTools.lhs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
index 3c465edd73..7b9ac1d338 100644
--- a/compiler/main/SysTools.lhs
+++ b/compiler/main/SysTools.lhs
@@ -225,6 +225,7 @@ initSysTools mbMinusB dflags0
-- gcc can cope
-- (see comments with declarations of global variables)
gcc_b_arg = Option ("-B" ++ installed "gcc-lib/")
+ gcc_mingw_include_arg = Option ("-I" ++ installed "include/mingw/")
(gcc_prog,gcc_args)
| isWindowsHost && am_installed
-- We tell gcc where its specs file + exes are (-B)
@@ -236,7 +237,7 @@ initSysTools mbMinusB dflags0
-- the path, possibly including those from a cygwin
-- install on the target, which is exactly what we're
-- trying to avoid.
- = (installed_bin "gcc", [gcc_b_arg])
+ = (installed_bin "gcc", [gcc_b_arg, gcc_mingw_include_arg])
| otherwise = (cGCC, [])
perl_path
| isWindowsHost && am_installed = installed_bin cGHC_PERL
@@ -268,7 +269,7 @@ initSysTools mbMinusB dflags0
[ Option "--dlltool-name",
Option (installed "gcc-lib/" </> "dlltool"),
Option "--driver-name",
- Option gcc_prog, gcc_b_arg ])
+ Option gcc_prog, gcc_b_arg, gcc_mingw_include_arg ])
| otherwise = (cMKDLL, [])
-- cpp is derived from gcc on all platforms