Handle config args for libffi, for cross compilation. Signed-off-by: Robert Schwebel <r.schwe...@pengutronix.de>
--- Makefile.pre.in | 2 ++ setup.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) Index: Python-3.0/setup.py =================================================================== --- Python-3.0.orig/setup.py +++ Python-3.0/setup.py @@ -1342,12 +1342,12 @@ class PyBuildExt(build_ext): ffi_configfile): from distutils.dir_util import mkpath mkpath(ffi_builddir) - config_args = [] + config_args = ['--host=%s' % os.environ.get('GNU_HOST'), '--build=%s' % os.environ.get('GNU_BUILD')] # 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)) res = os.system(cmd) if res or not os.path.exists(ffi_configfile): Index: Python-3.0/Makefile.pre.in =================================================================== --- Python-3.0.orig/Makefile.pre.in +++ Python-3.0/Makefile.pre.in @@ -423,6 +423,7 @@ sharedmods: $(PYTHON_FOR_BUILD) CC='$(CC)' \ LDSHARED='$(BLDSHARED)' \ OPT='$(OPT)' \ + CONFIG_ARGS="$(CONFIG_ARGS)" \ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build \ ;; \ *) \ @@ -431,6 +432,7 @@ sharedmods: $(PYTHON_FOR_BUILD) CC='$(CC)' \ LDSHARED='$(BLDSHARED)' \ OPT='$(OPT)' \ + CONFIG_ARGS="$(CONFIG_ARGS)" \ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build \ ;; \ esac -- Pengutronix e.K. | Dipl.-Ing. Robert Schwebel | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com