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

GHC ghc-devs at haskell.org
Mon Jan 25 22:59:31 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 rwbarton):

 In current cross-compiling builds, the stage1 compiler is a cross-compiler
 and the stage2 compiler is a native compiler for the target. I think
 you're talking about a scenario in which the stage1 compiler is a native
 compiler for the build system and the stage2 compiler is a cross-compiler.
 Otherwise, ghc-stage2 couldn't possibly link against the stage1 ghc
 library since they are built for different platforms. Is that right?

 If so, don't you have to also have to build all the libraries and the RTS
 twice. Once to be linked into the stage2 compiler which runs on the build
 system, and again to be linked into the executables that run on the target
 that are the output of the stage2 compiler. Similarly you have to detect
 the vagaries of both the host gcc, in order to build ghc-stage2, and the
 cross-compiling gcc, in order for ghc-stage2 to know how to build its
 output. Basically it seems like you have to do most of the work of #11470
 anyways.

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


More information about the ghc-tickets mailing list