Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,243
    • Issues 4,243
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 387
    • Merge Requests 387
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Wiki
  • cross compilation design

Last edited by Tobias Dammers Mar 29, 2019
Page history New page

cross compilation design

There are several people now interested in working on turning GHC into a Real Cross Compiler (something akin to the design laid out here.) This page covers that WIP, as well as architectural/design notes.

Current work

  • Brian Bloniarz implemented a cross compilation mode for hsc2hs. You can find the patches here. These have yet to be merged by GHC HQ, but we would like them to be!

  • Dan Knapp is working on the native code generators - removing everything that uses the pre-processor and instead threading an Architecture type through the compiler, containing ABI information so we can generate the correct code at runtime. You can check out his work by doing

    darcs get http://dankna.com/software/darcs/ghc-darcs-dnk-cross-compilation/

Other things worth considering/need doing/questions

  • The build system. This is the Big Mother - the design is laid out here. There are various things worth considering, like the fact that GHC builds programs as part of the build routine which it then uses, etc.
  • Will the RTS need modifications? We must build it multiple times with both the host and target toolchain C compilers, so it should mostly be OK, but we may need to do more

Design notes

TODO FIXME

Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Debugging
Commentary

Wiki

Title Index
Recent Changes