nixpkgs/pkgs/development/haskell-modules
Domen Kožar f031f3105a
GHC 8.0.2: use -split-sections
-split-sections replaced -split-objs with following upsides:

1) -split-objs adds considerable overhead to compile time

2) combined with stripping, it causes issues when cross-compiling

For upstream see https://ghc.haskell.org/trac/ghc/ticket/8405

This is supported only for Linux/Windows using ld linker.

GHC master also turns on -split-sections by default.

Example using stack:

Without splitting

  $ du /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share/bash-completion/completions
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share/bash-completion
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share
  23416   /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/bin
  23420   /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2

With -split-objs

  $ du /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2
  20632   /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/bin
  4 /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share/bash-completion/completions
  4 /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share/bash-completion
  4       /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share
  20636   /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2

With -split-sections

  $ du /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share/bash-completion/completions
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share/bash-completion
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share
  20672   /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/bin
  20676   /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2

Note: you currently need following overrides to build stack on 802:

   vector-algorithms = dontCheck super.vector-algorithms;
   path-io = doJailbreak super.path-io;
   stack = doJailbreak super.stack;

Note: Should also work on GHC 8.0.1, but I'm being careful here.
      We could backport later on.
2017-02-07 14:21:54 +01:00
..
patches ghc-head: Fixes for new base and Cabal 2017-01-07 10:28:48 -05:00
configuration-common.nix haskellPackages.mysql-simple: skip check 2017-02-04 01:41:45 +01:00
configuration-ghc-6.12.x.nix haskell: drop obsolete jailbreaking overrides 2016-10-20 13:40:10 +02:00
configuration-ghc-7.0.x.nix haskell: drop obsolete jailbreaking overrides 2016-10-20 13:40:10 +02:00
configuration-ghc-7.2.x.nix haskell: drop obsolete jailbreaking overrides 2016-10-20 13:40:10 +02:00
configuration-ghc-7.4.x.nix haskell: drop obsolete jailbreaking overrides 2016-10-20 13:40:10 +02:00
configuration-ghc-7.6.x.nix haskell-distributive: fix build with ghc versions prior to 8.x 2017-01-18 09:54:12 +01:00
configuration-ghc-7.8.x.nix haskell-distributive: fix build with ghc versions prior to 8.x 2017-01-18 09:54:12 +01:00
configuration-ghc-7.10.x.nix haskell-distributive: fix build with ghc versions prior to 8.x 2017-01-18 09:54:12 +01:00
configuration-ghc-8.0.x.nix haskell.packages.ghc802: dontCheck vector-algorithms 2017-01-12 16:35:08 +01:00
configuration-ghc-head.nix jailbreak-cabal: fix reference in ghc-HEAD overrides 2017-01-15 17:03:32 +01:00
configuration-ghcjs.nix haskell/ghcjs: fix ghcjs-ffiqq, add ghcjs-vdom (#20614) 2016-12-06 23:24:42 +01:00
configuration-hackage2nix.yaml hackage2nix: remove swagger2 from the list of broken packages 2017-02-02 17:43:04 +01:00
default.nix callCabal2nix: take "name" parameter as a function argument 2017-02-05 21:18:27 +01:00
generic-builder.nix GHC 8.0.2: use -split-sections 2017-02-07 14:21:54 +01:00
generic-stack-builder.nix haskell.lib.buildStackProject: fix #22386 2017-02-03 10:07:10 +01:00
hackage-packages.nix hackage-packages.nix: automatic Haskell package set update 2017-02-02 10:59:33 +01:00
hoogle-local-wrapper.sh Make hoogle-local compatible wih hoogle >= 5.0.4 2016-09-20 12:04:46 +02:00
hoogle.nix haskell/hoogle.nix: make an empty packages list possible 2016-11-24 12:31:58 +01:00
lib.nix GHC 8.0.2: use -split-sections 2017-02-07 14:21:54 +01:00
with-packages-wrapper.nix Merge pull request #21916 from Profpatsch/ghcWithPackages-docs 2017-01-16 10:58:06 +01:00