FIX BUILD: GHC doesn't use filepath (yet)
[ghc-hetmet.git] / compiler / main / SysTools.lhs
index c9993a2..5805e3c 100644 (file)
@@ -75,7 +75,6 @@ import GHC.IOBase       ( IOErrorType(..) )
 #else
 import System.Process  ( runInteractiveProcess, getProcessExitCode )
 import Control.Concurrent( forkIO, newChan, readChan, writeChan )
-import Data.Char        ( isSpace )
 import FastString       ( mkFastString )
 import SrcLoc           ( SrcLoc, mkSrcLoc, noSrcSpan, mkSrcSpan )
 #endif
@@ -486,7 +485,8 @@ getGccEnv opts =
   get_b_opt (Option ('-':'B':dir)) = Left dir
   get_b_opt other = Right other  
 
-  mangle_path ("PATH",paths) = ("PATH", '\"' : head b_dirs ++ "\";" ++ paths)
+  mangle_path (path,paths) | map toUpper path == "PATH" 
+        = (path, '\"' : head b_dirs ++ "\";" ++ paths)
   mangle_path other = other
 #endif