[GHC] #9218: Upgrade the version of MinGW shipped with GHC

GHC ghc-devs at haskell.org
Mon Oct 27 08:45:34 UTC 2014


#9218: Upgrade the version of MinGW shipped with GHC
-------------------------------------+-------------------------------------
              Reporter:  komadori    |            Owner:  gintas
                  Type:  task        |           Status:  patch
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Build       |          Version:  7.8.2
  System                             |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:  Windows     |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:  #3390
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D339   |
-------------------------------------+-------------------------------------

Comment (by awson):

 Here I propose my patchset for `rts/Linker.c` (against current HEAD).

 It intersects with Gintas' one, but does a bit more (`COMDAT` support for
 gcc 4.9.x) and does some things in a more straightforward manner -- mostly
 in handling name decoration things.

 What's going on with name decoration? Well, original code have some crufty
 and ad-hocish paths related mostly to very old mingw gcc/binutils/runtime
 combinations. Now mingw-w64 offers pretty uniform and MS-compatible
 decoration scheme across its tools and runtime.

 The scheme is pretty straightforward: on 32 bit objects symbols are
 exported with underscore prepended (and `@` + stack size suffix appended
 for `stdcall` functions), on 64 bits no underscore is prepended and no
 suffix is appended because we have no `stdcall` convention on 64 bits.

 On top of that `__imp_` prefix is further prepended for `dllimport`ed
 symbols.

 Mingw-w64 runtime is conformant to MS declaring all win32 symbols
 `dllimport`ed, while old mingw is not and this is why 32-bit cases differs
 so much.

 I commented on this extensively in #7097 and #2283.

 My patch reflects these considerations and also unifies a bunch of RTS
 imports between 32 and 64 bit cases.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9218#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list