
#9524: GHC uses wrong linker when cross compiling -------------------------------------+------------------------------------- Reporter: Kritzefitz | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.4 Resolution: | Keywords: Cross Operating System: Linux | compiling Type of failure: Building GHC | Architecture: x86 failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by erikd): The problem was that the `hsc2hs` code has a number of code blocks wrapped in: {{{ #if defined(mingw_HOST_OS) }}} and `mingw_HOST_OS` is defined when cross compiling from Linux/OSX to Windows. If I change the above to: {{{ #if (defined(mingw32_HOST_OS) && HostPlatform_TYPE == mingw32_HOST_OS) }}} the cross-compile process proceeds past this issue and runs into other issues later in the compile process. I don't have a Windows machine to test that this doesn't break MinGW native builds but the above certainly seems sensible. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9524#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler