[GHC] #11378: Use the compiler that built ghc for dynamic code loading, for cross-compiling

GHC ghc-devs at haskell.org
Thu Dec 1 13:35:58 UTC 2016


#11378: Use the compiler that built ghc for dynamic code loading, for cross-
compiling
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  lowest            |            Milestone:  ⊥
       Component:  Template Haskell  |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11470            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by shlevy):

 I don't think it's really most of the work, since we already need to know
 all of the relevant info about the host and the target to do cross-
 compiling at all, whereas #11470 requires info about arbitrary targets.

 I think the best option here is to do a 3- or 4- stage compile for cross-
 compilation, where the last stage is optional:

 3-stage: stage 1 is normal host-native stage 1, stage 2 runs on host and
 can target both host and target, stage 3 is a cross-compiled target-native
 GHC. This has the benefit of only requiring the stage 2 compiler to be
 around to do TH/plugins/ghci, but requires a single ghc binary to be able
 to target two architectures

 4-stage: stage 1 and stage 2 are normal host-native stage 1 and stage 2,
 stage 3 runs on host and targets target, stage 4 is a cross-compiled
 target-native GHC. This has the benefit of not needing to teach a single
 compiler multiple targets, but you'd need to keep both stage 2 and stage 3
 around if you wanted to do TH/plugins/ghci.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11378#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list