[Msys2-users] Debugging undeterministic segfaults

David Macek david.macek.0 at gmail.com
Mon Nov 3 23:55:57 UTC 2014

On 4. 11. 2014 0:07, Gintautas Miliauskas wrote:
> A PKGBUILD for ghc should be feasible, although the bootstrapping is a bit tricky (some Haskell tools need to be preinstalled). I'm not sure how useful it would be since for Windows there is already a nicely packaged native Haskell Platform installer.

It definitely helps MSYS2 users by providing an easily installable ghc package. That in turn could help with setting up ghc development environment. Hopefully after Windows ghc migrates to gcc 4.8, ghc package will be able to use the MSYS2 packaged toolchain to reduce duplication.

I have this so far, but I give no guarantees: https://github.com/elieux/MINGW-packages/tree/ghc

To use:
- download ghc and put it in PATH
- optionally alter ghc/lib/settings to use MSYS2 toolchain instead of the bundled one (see below)
- use cabal-install PKGBUILD to build Cabal and put it in PATH
- use built Cabal to download and build Alex and Happy and put them in PATH (I think they're installed somewhere inside AppData by default)
- run ghc PKGBUILD

Related: https://www.haskell.org/pipermail/ghc-devs/2014-October/006759.html

My ghc/lib/settings (from version 7.6.3):

[("GCC extra via C opts", " -fwrapv"),
 ("C compiler command", "gcc.exe"),
 ("C compiler flags", " -fno-stack-protector  -Wl,--hash-size=31 -Wl,--reduce-memory-overheads"),
 ("ar command", "ar.exe"),
 ("ar flags", "q"),
 ("ar supports at file", "YES"),
 ("touch command", "$topdir/touchy.exe"),
 ("dllwrap command", "dllwrap.exe"),
 ("windres command", "windres.exe"),
 ("perl command", "perl.exe"),
 ("target os", "OSMinGW32"),
 ("target arch", "ArchX86_64"),
 ("target word size", "8"),
 ("target has GNU nonexec stack", "False"),
 ("target has .ident directive", "True"),
 ("target has subsections via symbols", "False"),
 ("LLVM llc command", ""),
 ("LLVM opt command", "")

David Macek

More information about the ghc-devs mailing list