[Python-Dev] Using SCons for cross-compilation (original) (raw)

David Boddie david at boddie.org.uk
Thu Nov 9 16:42:48 CET 2006


On Thu Nov 9 07:45:30 CET 2006, Anthony Baxter wrote:

On Thursday 09 November 2006 16:30, Martin v. Löwis wrote: > Patch #841454 takes a stab at cross-compilation > (for MingW32 on a Linux system, in this case), > and proposes to use SCons instead of setup.py > to compile extension modules. Usage of SCons > would be restricted to cross-compilation (for > the moment). > > What do you think?

So we'd now have 3 places to update when things change (setup.py, PCbuild area, SCons)? How does this deal with the problems that autoconf has with cross-compilation? It would seem to me that just fixing the extension module building is a tiny part of the problem... or am I missing something?

I've been working on adding cross-compiling support to Python's build system, too, though I've had the luxury of building on Linux for a target platform that also runs Linux. Since the build system originally came from the GCC project, it shouldn't surprise anyone that there's already a certain level of support for cross-compilation built in. Simply setting the --build and --host options is a good start, for example.

It seems that Martin's patch solves some problems I encountered more cleanly (in certain respects) than the solutions I came up with. Here are some issues I encountered (from memory):

I'll try to look at Martin's patch at some point. I hope these observations and suggestions help explain the current issues with the build system when cross-compiling.

David



More information about the Python-Dev mailing list