Cross-compiling Template Haskell via -fexternal-interpreter and IPC

Alberto Valverde alberto at toscat.net
Thu Jul 7 00:01:26 UTC 2016


Ben, Phyx,

On Wed, Jul 6, 2016 at 7:14 PM, Ben Gamari <ben at smart-cactus.org> wrote:

> (...)
> Ahh, right. Out of curiosity what toolchain are you using to build your
> stage 1 cross compiler?
>

I'm using an MXE (http://mxe.cc) environment in a Debian Jessie Docker
image which has gcc-4.9.3. The build env is here:
https://github.com/albertov/ghc-cross-compiler-windows-x86

On Wed, Jul 6, 2016 at 7:14 PM, Ben Gamari <ben at smart-cactus.org> wrote:

> It would be nice if we could avoid it; GHC depending upon a library has
> the very unfortunate effect that any user code also needing to link
> against GHC or one of its libraries now has no choice in the version of
> that library. We go to some lengths to try to keep the dependency
> footprint of GHC small for this reason.

(...)
> > Named pipes have also crossed my mind but I'm not sure how well they're
> > supported by wine.
> >
> It would be great if there were some way we could make this work with
> named pipes. Not only does it side-step the dependency issue, but it
> feels like the right way forward.
>

 On Wed, Jul 6, 2016 at 8:05 PM, Phyx <lonetiger at gmail.com> wrote:

> Named pipes would solve your issue, Just don't forget to set the proper
> ACL on the pipes.
>
>
It does indeed work! However, I've broken GHC on a Windows host until I
implement the equivalent to Posix.createNamedPipe since it seems there's no
binding for CreateNamedPipe that I can find in the tree. I'll look into it
tomorrow.

I've pushed the changes so far to
https://github.com/albertov/ghc/tree/cross-external-interpreter.

Thanks
Alberto


> Cheers,
>
> - Ben
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160707/111ba4a2/attachment.html>


More information about the ghc-devs mailing list