diff -Naurp Python-2.5.4.orig/setup.py Python-2.5.4/setup.py --- Python-2.5.4.orig/setup.py 2009-03-03 02:16:54.000000000 -0500 +++ Python-2.5.4/setup.py 2009-03-03 02:18:03.692693480 -0500 @@ -1394,12 +1394,19 @@ class PyBuildExt(build_ext): ffi_configfile): from distutils.dir_util import mkpath mkpath(ffi_builddir) - config_args = [] + if os.environ.get('CROSS_COMPILING') == 'yes': + config_args = ['--host=' + os.getenv("CHOST", "")] + else: + config_args = [] # Pass empty CFLAGS because we'll just append the resulting # CFLAGS to Python's; -g or -O2 is to be avoided. cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) + % (ffi_builddir, ffi_srcdir, "".join(config_args)) + + fout = open("xxxxx.txt", "w") + fout.write(cmd) + fout.close() res = os.system(cmd) if res or not os.path.exists(ffi_configfile):