Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531016 - dev-lang/ghc USE=binary - /usr/lib/ghc-7.6.3/settings sets wrong "C compiler command"
Summary: dev-lang/ghc USE=binary - /usr/lib/ghc-7.6.3/settings sets wrong "C compiler ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
: 548796 607142 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-28 16:28 UTC by Daniel Goertzen
Modified: 2017-01-25 19:47 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Goertzen 2014-11-28 16:28:29 UTC
ghc won't build on non-i686 x86 systems because the binary bootstrapping ghc is configured to use i686-pc-linux-gnu-gcc.  This is of course absent if you have say an i486 gentoo system (like me!).

The settings file is...

# cat /var/tmp/portage/dev-lang/ghc-7.6.3-r1/work/usr/lib/ghc-7.6.3/settings 
[("GCC extra via C opts", " -fwrapv"),
 ("C compiler command", "i686-pc-linux-gnu-gcc"),
 ("C compiler flags", ... [snip]


The ebuild should tweak the settings file to a reasonable gcc after unpacking.


A work-around to get a working ghc installation:

USE=binary emerge ghc
nano -w /usr/lib/ghc-7.6.3/settings    (change C compiler to just "gcc")




Reproducible: Always
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2014-11-28 21:59:03 UTC
We build ghc binary on i686 CHOST.
You have potential problem if ghc will use CMOVs for example.

Why you are using i486 CHOST?
Last time I asked user why he needs i486 was just his unawareness
that his VIA CPU was i686 capable.

Can you show your target's /proc/cpuinfo?

But I'm not against any changes helping your use case.
Comment 2 Daniel Goertzen 2014-11-28 23:45:02 UTC
I am using a i486 gentoo chroot to build an OS image that will run on actual 486 hardware (cyrix 5x86DX I think).  Build cpu is really a modern amd64, so I won't have any issues with i686 specific instructions.  I only want Haskell to try out Shake for the build system.  No plans on running any Haskell on the 486 machine.

But, I've seen at least 2 other threads in forums with this problem.  One of them may have been the VIA CPU issue you mentioned.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2016-05-14 17:23:59 UTC
*** Bug 548796 has been marked as a duplicate of this bug. ***
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-01-25 19:47:59 UTC
*** Bug 607142 has been marked as a duplicate of this bug. ***