Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536426 - dev-lang/ghc-7.8.3: Patch to fix compilation with ld.gold
Summary: dev-lang/ghc-7.8.3: Patch to fix compilation with ld.gold
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: http://git.haskell.org/ghc.git/commit...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-01-12 21:02 UTC by Eric Siegel
Modified: 2015-01-13 22:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ghc-7.8.3-ld.gold.patch (ghc-7.8.3-ld.gold.patch,987 bytes, patch)
2015-01-13 13:32 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Siegel 2015-01-12 21:02:15 UTC
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
Comment 1 Michael Orlitzky gentoo-dev 2015-01-13 13:32:13 UTC
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.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2015-01-13 22:13:34 UTC
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.