X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FSysTools.lhs;h=828530bc12c5dde1845e59ac5894c3821d86b04d;hb=049cdffa62fb2e0b1580eacb5ed8a30650c3faf7;hp=3c465edd7386960e6dcfbc898b4fa201b0758931;hpb=aa9a4f1053d3c554629a2ec25955e7530c95b892;p=ghc-hetmet.git diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 3c465ed..828530b 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 @@ -843,7 +844,7 @@ getBaseDir = do let len = (2048::Int) -- plenty, PATH_MAX is 512 under Win32. return (Just (rootDir s)) where rootDir s = case splitFileName $ normalise s of - (d, "ghc.exe") -> + (d, ghc_exe) | map toLower ghc_exe == "ghc.exe" -> case splitFileName $ takeDirectory d of -- installed ghc.exe is in $topdir/bin/ghc.exe (d', "bin") -> takeDirectory d'