[GHC] #13541: Make it easier to use the gold linker

GHC ghc-devs at haskell.org
Fri Apr 7 00:10:02 UTC 2017


#13541: Make it easier to use the gold linker
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 As pointed out in #4862, the `gold` linker is significantly faster than
 BFD `ld`. Currently we use whatever linker `gcc` uses by default. This is
 an unfortunate situation for users as few packagers take the effort to
 configure their builds to use `gold`.

 I think we should consider the following,

 > Introduce a configure flag (to both the source distribution, and the
 distributed binary distributions), `--enable-gold`. When enabled,
 `configure` will check for the functioning of `gcc -fuse-ld=gold`. If
 found to work `-fuse-ld=gold` would be added to GHC's `optl`. The flag
 would throw an error on non-ELF platforms (which are not supported by
 `gold`).

 While there is admittedly not a whole lot of precedent for this, the
 status quo means we are leaving a significant bit of compiler performance
 on the table in a majority of cases. Given that `stack` uses GHC's
 official bindists, we should try to improve this situation.

  *

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


More information about the ghc-tickets mailing list