[GHC] #7942: aarch64 support in ghc
GHC
ghc-devs at haskell.org
Fri Apr 4 20:06:33 UTC 2014
#7942: aarch64 support in ghc
--------------------------------------------+------------------------------
Reporter: jcapik | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Linux | Architecture: arm
Type of failure: GHC doesn't work at all | Difficulty: Unknown
Test Case: | Blocked By: 7623, 8664
Blocking: | Related Tickets:
--------------------------------------------+------------------------------
Comment (by cjwatson):
I've been working with Karel Gardas (kgardas) to get this going, and I've
now completed an unregisterised GHC bootstrap on Ubuntu arm64. I started
by cross-building GHC 7.8 using variations on Karel's patch set, and then
bodged together a GHC 7.6 build (since that's what we're shipping on other
architectures) bootstrapping off that. This all now appears to be working
fine and I should be able to get binaries into our archive in the next few
days.
I'm attaching a patch (made against the ghc-7.8 branch); most of it is
Karel's from https://ghcarm.wordpress.com/2014/01/18/unregisterised-ghc-
head-build-for-arm64-platform/, I've just tweaked it a bit given that I
had the advantage of access to real hardware. Some of this may be
unnecessary for an unregisterised build, but it doesn't hurt. It would be
great if somebody could review and apply it, since it's a lot easier to
get started on more advanced things like LLVM or NCG support if you don't
have to do the time-consuming bootstrap yourself. Please note that you
also need to update the embedded copy of libffi in `libffi-tarballs/` to
at least version 3.0.12.
Karel's initial patch caused `GHC_CONVERT_CPU` to return `arm64`. I
changed this to `aarch64`, since the return value of `GHC_CONVERT_CPU` is
used to construct the `--host` option for configure scripts and thus it
needs to be valid as the first part of a GNU config triplet. I left the
Haskell-level architecture name as `ArchARM64`, since that style is more
common as a user-facing name for the architecture: for example, the Linux
kernel returns `arm64` in its `uname` output.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7942#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list