[GHC] #11445: Turn on SplitSections by default

GHC ghc-devs at haskell.org
Fri Dec 2 11:52:26 UTC 2016


#11445: Turn on SplitSections by default
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Build System      |              Version:  8.0.1-rc1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  11285
 Related Tickets:                    |  Differential Rev(s):  Phab:D1800
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by awson):

 The summary (for Windows):

 1. I always used patched binutils and never used separate linker scripts,
 thus can't comment on potential problems with the latter.
 2. On 64-bit GHC I don't use `-split-objs` at all and use `-split-
 sections` exclusively for almost a year and I never had any problems with
 this. The only '''important''' thing one should remember is that we
 sometimes need to supply `-opta-Wa,-mbig-obj` to GHC to make it build
 correct object files (I know 2 package which require this: `template-
 haskell` when building GHC itself and `haskell-src-exts`). One possible
 option is to always use this flag if `-split-sections` is used.
 3. `-split-sections` doesn't introduce any noticeable overhead when
 compiling and thus is '''dramatically''' faster than `-split-objs` when
 building packages, it is slightly slower when linking final executables
 though.
 4. 64-bit GHC itself can be built in release configuration with `-split-
 objs` replaced by `-split-sections` absolutely with no problems (only
 `-opta-Wa,-mbig-obj` should be added to `ghc-options` in `template-
 haskell` cabal file). 32-bit GHC building process is less smooth and
 requires a special handling of `template-haskell` package (one needs to
 recompile `Language.Haskell.TH.Syntax` module in profiling configuration
 with `-split-objs`). Overall, building release GHC itself with `-split-
 sections` is '''much''' faster than with `-split-objs`.

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


More information about the ghc-tickets mailing list