parrot/parrot — Issue #173: Script to cross-compile Parrot with qemu
Author: leto
Created: 2011-10-19 17:21:14+00:00
State: open

This was originally: http://trac.parrot.org/parrot/ticket/610

May I suggest that we cheat a little and use qemu attain the goal of what we want from cross-compiling, without actually cross-compiling.

I stole this idea from how emacs is cross-compiled in OpenEmbedded. Here is the rough idea:

1) We add some arguments to Configure.pl to specify a target architechture 2) Our config subsystem learns how to detect if qemu is available 3) If qemu isn't available, die if attempting to cross compile 4) If qemu is available, start a qemu process of the wanted target architecture, then run the entire build process within qemu

The output of this will be binaries for architecture X, which are actually compiled, through the magic unicorn farts of qemu, for architecture Y.

I think that this is actually feasible in the short term, unlike *actually* modifying our config+build system to natively cross-compile, which I highly doubt will happen before the heat death of the universe.

To clarify, after qemu is started, another run of Configure.pl inside of qemu will be needed, and then a build.