[project @ 2004-05-05 19:48:54 by krasimir]
authorkrasimir <unknown>
Wed, 5 May 2004 19:48:54 +0000 (19:48 +0000)
committerkrasimir <unknown>
Wed, 5 May 2004 19:48:54 +0000 (19:48 +0000)
The commit allows to build GHCi libraries in Windows Command Prompt

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.")
 
 -----------------------------------------------------------------------------