[project @ 2004-08-02 18:23:25 by panne]
[ghc-hetmet.git] / ghc / utils / ghc-pkg / Main.hs
index c5ec0d5..05c92e3 100644 (file)
@@ -372,9 +372,15 @@ autoBuildGHCiLib dir batch_file ghci_file = do
   system("ld -r -x -o " ++ ghci_lib_file ++ 
         " -all_load " ++ batch_lib_file)
 #else
+#ifdef mingw32_HOST_OS
+  execDir <- getExecDir "/bin/ghc-pkg.exe"
+  system (maybe "" (++"/gcc-lib/") execDir++"ld -r -x -o " ++ ghci_lib_file ++ 
+        " --whole-archive " ++ batch_lib_file)
+#else
   system("ld -r -x -o " ++ ghci_lib_file ++ 
         " --whole-archive " ++ batch_lib_file)
 #endif
+#endif
   hPutStrLn stderr (" done.")
 
 -----------------------------------------------------------------------------