This allows our GHCs to build programs with DWARF debug information
when -g is passed, see https://ghc.haskell.org/trac/ghc/wiki/DWARF.
Compiling with debug symbols is off by default until GHC ticket #15960
(Using -g causes differences in generated core) is fixed.
gold is known to speed up GHC builds considerably, saving up to many seconds
when linking large Haskell applications, so this patch configures all
non-binary GHC derivations to use gold.
To test this I built a version of the compiler with `dontStrip = True`
and the vanilla version. The size of the result is both 1.4gb which
indicates that the stripping doesn't do anything meaningful.
Not stripping means that the debug rts is properly packages as it
contains DWARF information and unused debugging symbols.
Fixes#63511
`pkgsBuildTarget` allows us to avoid repeated and confusing conditions.
The others merely provide clarity for one the foreign package set's
target platform matters.