[Haskell-cafe] Building 32-bit binaries on a 64-bit system?

Roman Cheplyaka roma at ro-che.info
Sat Oct 17 14:04:43 UTC 2015

On 10/17/2015 03:29 PM, Mike Meyer wrote:
> Thanks, the worked like a charm! Any chance this can be used for
> cross-compiling from a Unix desktop to embedded arm?

Not as easy as that. This solution relies on the fact that you can run
i386 binaries on x86-64, which is obviously not true for arm.

See https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling for
how to build a cross-compiler.

> On Fri, Oct 16, 2015, 09:24 Michael Snoyman <michael at snoyman.com
> <mailto:michael at snoyman.com>> wrote:
>     Stack has a command line argument --arch, mostly intended for the
>     Windows case. Try stack --install-ghc --arch i386 build, it should
>     do what you want.
>     On Fri, Oct 16, 2015, 5:22 PM Mike Meyer <mwm at mired.org
>     <mailto:mwm at mired.org>> wrote:
>         I've got someone who wants to run one of my haskell apps on a
>         32-bit Windows 10 box. I've pretty  much moved to 64-bit
>         everywhere, so don't have such a system to build on.
>         Is it possible to get stack/cabal/ghc to build a 32-bit Windows
>         binary on a 64-bit Windows box? Google found a bunch of things
>         about building 64 bit applications, and the ghc manual doesn't
>         seem to have such an option. So do I need to get a 32-bit system
>         for this?
>         _______________________________________________
>         Haskell-Cafe mailing list
>         Haskell-Cafe at haskell.org <mailto:Haskell-Cafe at haskell.org>
>         http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151017/d386a5a3/attachment.sig>

More information about the Haskell-Cafe mailing list