[gambit-list] Cross-compilation Q
feeley at iro.umontreal.ca
Thu Oct 17 10:25:15 EDT 2019
> On Oct 17, 2019, at 9:17 AM, Adam <adam.mlmb at gmail.com> wrote:
> Hi Marc,
> Talked to Vyzo, and this question came up:
> In the C backend using GCC, Gambit supports cross-compliation (say to an ARM Mac OS or Android from some AMD Unix machine), right.
> How do you pull off cross-compilation relative to not having ./configure have a host to autodetect features on,
> Which considerations do I need to make for successful cross-compliation?
> Do I need a separate Gambit build for each destination platform (so I'd do the |compile-file| within the respective build), or can my default Gambit installation be tweaked to compile against multiple platforms?
The configure script is a shell script that relies on basic tools (grep, sed, …) and the C compiler to detect the properties of the platform. So when you compile a Scheme app to .c you should run the configure script first, and then compile the .c files of your app (and the files in lib/).
The .c files generated are *completely* independent of the platform they were compiled on. You can compile a .scm file on linux 64 bit, and Windows 32 bit, and raspberry pi ARM and you will get the same .c file generated from gsc.
More information about the Gambit-list