The current version of dev-lang/ghc-7.8.3 does not work with ld.gold. I tried dev-lang/ghc-7.6.3-r1, but I got an error about ld.gold not supporting --hash-size=31. I did some research and found that dev-lang/ghc-7.8.3 fixes that issue, but introduces another: /usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find libraries/ghc-prim/dist-install/build/GHC/Types_o_split/Types__1.o I found a bug report upstream with this exact issue and a patch. Here's link to that report: https://ghc.haskell.org/trac/ghc/ticket/7452 I patched the dev-lang/ghc-7.8.3 ebuild myself using the patch found here https://git.haskell.org/ghc.git/commitdiff/021b7978d14799bae779907faf7490cfd21b3f46 That made dev-lang/ghc-7.8.3 compile correctly with ld.gold. Can that patch be added to the ebuild? Reproducible: Always
Created attachment 393850 [details, diff] ghc-7.8.3-ld.gold.patch I tested this on ghc-7.8.4 after `binutils-config --linker ld.gold`: * Without the patch, the build fails * With the patch, it succeeds * Everything seems fine I'll leave it up to slyfox whether or not we want to backport this.
Pushed as: > 13 Jan 2015; Sergei Trofimovich <slyfox@gentoo.org> > +files/ghc-7.8.4-gold.patch, ghc-7.8.4.ebuild: > Backported gold linker support (bug #536426 and fix by Eric Siegel). Thanks guys! I'd not like to touch 7.6.3 as it will need more, than this single tweak.