[Python-checkins] cpython (merge 3.5 -> default): Issue #27490: Merge pgen cross-compile logic from 3.5

martin.panter python-checkins at python.org
Wed Jul 27 21:33:47 EDT 2016


https://hg.python.org/cpython/rev/98df00834c58
changeset:   102465:98df00834c58
parent:      102461:da9898e7e90d
parent:      102463:c6476003e67f
user:        Martin Panter <vadmium+py at gmail.com>
date:        Thu Jul 28 01:30:06 2016 +0000
summary:
  Issue #27490: Merge pgen cross-compile logic from 3.5

files:
  Makefile.pre.in |  2 +-
  Misc/ACKS       |  1 +
  Misc/NEWS       |  3 +++
  configure       |  6 +++++-
  configure.ac    |  3 +++
  5 files changed, 13 insertions(+), 2 deletions(-)


diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -791,7 +791,7 @@
 
 $(IO_OBJS): $(IO_H)
 
-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+$(GRAMMAR_H): $(GRAMMAR_INPUT) @PGEN_DEPENDENCY@
 	@$(MKDIR_P) Include
 	# Avoid copying the file onto itself for an in-tree build
 	if test "$(cross_compiling)" != "yes"; then \
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1131,6 +1131,7 @@
 Bo Peng
 Santiago Peresón
 George Peristerakis
+Thomas Perl
 Mathieu Perreault
 Mark Perrego
 Trevor Perrin
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -80,6 +80,9 @@
 Build
 -----
 
+- Issue #27490: Do not build pgen when cross-compiling.  Patch by Thomas
+  Perl.
+
 - Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
   used for file generation during the build.
 
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -740,6 +740,7 @@
 CONFIG_ARGS
 SOVERSION
 VERSION
+PGEN_DEPENDENCY
 PYTHON_FOR_BUILD
 PYTHON_FOR_GEN
 host_os
@@ -3050,11 +3051,14 @@
 $as_echo "$interp" >&6; }
 	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
     fi
+    PGEN_DEPENDENCY=''
 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
+    PGEN_DEPENDENCY='$(PGEN)'
+fi
+
 
 
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -81,12 +81,15 @@
         AC_MSG_RESULT($interp)
 	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
     fi
+    PGEN_DEPENDENCY=''
 elif test "$cross_compiling" = maybe; then
     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
 else
     PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
+    PGEN_DEPENDENCY='$(PGEN)'
 fi
 AC_SUBST(PYTHON_FOR_BUILD)
+AC_SUBST(PGEN_DEPENDENCY)
 
 dnl Ensure that if prefix is specified, it does not end in a slash. If
 dnl it does, we get path names containing '//' which is both ugly and

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list