]> granicus.if.org Git - python/commitdiff
Cross compiling needs host and build settings. configure no longer
authorChristian Heimes <christian@cheimes.de>
Wed, 12 Dec 2012 12:10:21 +0000 (13:10 +0100)
committerChristian Heimes <christian@cheimes.de>
Wed, 12 Dec 2012 12:10:21 +0000 (13:10 +0100)
creates a broken PYTHON_FOR_BUILD variable when --build is missing.

Misc/NEWS
configure
configure.ac

index c57b165ccd6115eab48de607fd01970405aac08d..58675e86bf16872f9d9de8422d805268754e1d54 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -316,6 +316,9 @@ Tests
 Build
 -----
 
+- Cross compiling needs host and build settings. configure no longer
+  creates a broken PYTHON_FOR_BUILD variable when --build is missing.
+
 - Fix cross compiling issue in setup.py, ensure that lib_dirs and inc_dirs are
   defined in cross compiling mode, too.
 
index 5fc460f2f2f17ecd3569a84b6881598c36627b38..6407cc4b68842e489a9bfd4eacd324680956b29c 100755 (executable)
--- a/configure
+++ b/configure
@@ -2943,6 +2943,8 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
 $as_echo "$interp" >&6; }
        PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
     fi
+elif test "$cross_compiling" = maybe; then
+    as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
 else
     PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
 fi
index 2738703b1b5f569c88447e14637965453d00b29d..ef58a9fecf7cc8558a4500bf2d2503d0fb2f20b5 100644 (file)
@@ -67,6 +67,8 @@ if test "$cross_compiling" = yes; then
         AC_MSG_RESULT($interp)
        PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
     fi
+elif test "$cross_compiling" = maybe; then
+    AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
 else
     PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
 fi