Cross-compilation with GHC

别来无恙 提交于 2019-12-09 05:16:34

问题


Is it possible to do cross-compilation with the Glasgow Haskell Compiler for common architectures?

If not, is this feature planned to be developed in the near future?


回答1:


As of this moment (GHC 7.0) GHC does not support cross-compilation.

As of 2013, "support for cross-compilation works reasonably well in GHC 7.8.1".

See the status on the CrossCompilation wiki page.


Discussion

GHC has always supported self-cross-compilation (i.e. you can port GHC to a new architecture). However, GHC as a cross-compiler, that runs on a host, but produces binaries that target another, has not been supported.

As of GHC 7 though, with the new LLVM backend, work is being undertaken to add cross-compilation support. Status appears to be, from Mark Lentczner, "At this point I can build and link and run a stage1 cross-compiler." So stay tuned for GHC 7.2



来源:https://stackoverflow.com/questions/6171429/cross-compilation-with-ghc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!