Re: Cross-compiling the runtime
Matthew Fluet <[email protected]> Wed, 10 Jan 2018 07:26:36 -0800
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <CAMrhFL4oOvd88SPFE_htpj1s2=cXVUw4EasB7U8Wk2wn+eR=vA@mail.gmail.com> |
On Tue, Jan 9, 2018 at 8:01 PM, M. Bellaire <[email protected]> wrote: > First, it would seem that to port Mlton-generated C code to another device, > I should only need the Mlton runtime on the target. Do I need anything > else? You need everything that ends up in the 'build/lib/mlton/targets/self' directory on a non-cross-compiling self-compile. In particular, the 'include/c-types.h' and 'sml/c-types.sml' files are generated when building the runtime system (but aren't part of the libraries). Those files are generated by running code, so they would need to be run on the target, I'm fairly certain. > I want to compile the runtime for an Arm device without necessarily having > access to the target machine itself. I have functioning toolchains > available. Would it be possible to do this from the host machine, or do I > still need to run "print-constants" on a real target device and migrate the > file to the host to build the library? You should be able to produce the libraries on your host with a cross-compiling toolchain. But, the print-constants is like the generators for the above files --- it makes most sense to run it on the target and bring the results back to the host. I imagine that many of the C sizes and constants are the same on x86-linux or amd64-linux as on arm-linux, so you might be able to reuse them. There are some notes on cross-compiling at http://mlton.org/CrossCompiling; although the `add-cross` script that it mentions requires having ssh access to a target machine. -Matthew -- You received this message because you are subscribed to the Google Groups "MLton-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot