on when to build ghci libs in cabal

Isaac Jones ijones at syntaxpolice.org
Mon Aug 8 22:08:34 EDT 2005


Brian Smith <brianlsmith at gmail.com> writes:

(snip)
> the current code assumes that "ld" is
> in the system path. On windows, without Cygwin or MinGW, this is
> usually not the case. People will add only, e.g. c:\ghc\ghc-6.4.1\bin
> to the path. But, GHC's copy of ld.exe is in
> "c:\ghc\ghc-6.4.1\gcc-lib." Also, if MinGW or Cygwin is being used,
> then the "ld" in the path might be different than the one GHC normally
> uses. I recommend invoking "ld" just like ghc-pkg does:
>
> #if defined(darwin_HOST_OS)
>   r <- rawSystem "ld" ["-r","-x","-o",ghci_lib_file,"-all_load",batch_lib_file]
> #elif defined(mingw32_HOST_OS)
>   execDir <- getExecDir "/bin/ghc-pkg.exe"
>   r <- rawSystem (maybe "" (++"/gcc-lib/") execDir++"ld")
> ["-r","-x","-o",ghci_lib_file,"--whole-archive",batch_lib_file]
> #else
>   r <- rawSystem "ld"
> ["-r","-x","-o",ghci_lib_file,"--whole-archive",batch_lib_file]
> #endif

Brian sent me a patch for this which I've pushed out.  Can I get other
Windows testers, please?

peace,

  isaac


More information about the Libraries mailing list