[Python-Dev] [Distutils] FW: [issue2513] 64bit cross compilation on windows (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Thu Apr 3 08:41:44 CEST 2008


Actually, I think it is slightly. IIUC, the AMD64 build currently assumes it can execute x86 executables in various places. To fix this, the build process for each of the platforms would be slightly different.

Why does that need fixing? The AMD64 build can execute x86 binaries, whether it is performed on Win32 or Win64.

A problem only arises if the AMD64 build assumes that it can execute AMD64 binaries, and it is a cross-compilation. As a consequence, we must never execute the python.exe that we just built during the build process.

My proposal would allow (eg) 'PCBuild\python.exe' or 'PCBuild\makeversioninfo.exe' to specified in build processes, with the knowledge it will work, regardless of what platform it is being run on.

No to python.exe, yes to make_versioninfo.exe. make_versioninfo.exe is always an x86 binary, so it is always safe to execute on Windows. If you tried to execute PCBuild\python.exe, it would break my builds: I don't have x86 binaries in PCBuild when I cross-compile for AMD64.

Instead, I've changed the build process to run HOST_PYTHON if that is set, and only fall back to PCBuild\python.exe if it isn't.

Regards, Martin



More information about the Python-Dev mailing list