# HG changeset patch # User Thomas Perl # Date 1469182299 -7200 # Fri Jul 22 12:11:39 2016 +0200 # Node ID a4c9e342ffaff86c107ed9437377c8d0ae9409df # Parent 829117ae2e5550523bf551d9264c24fa9f7f0de9 Do not build pgen when cross-compiling (issue 27490) The dependendency on the $(PGEN) variable must only be set when not cross-compiling. When cross-compiling, $(PGEN) will not be used, so no need to build it. diff -r 829117ae2e55 -r a4c9e342ffaf Makefile.pre.in --- a/Makefile.pre.in Tue Jul 19 16:46:09 2016 -0500 +++ b/Makefile.pre.in Fri Jul 22 12:11:39 2016 +0200 @@ -790,7 +790,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 -r 829117ae2e55 -r a4c9e342ffaf configure --- a/configure Tue Jul 19 16:46:09 2016 -0500 +++ b/configure Fri Jul 22 12:11:39 2016 +0200 @@ -743,6 +743,7 @@ CONFIG_ARGS SOVERSION VERSION +PGEN_DEPENDENCY PYTHON_FOR_BUILD host_os host_vendor @@ -3014,11 +3015,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 -r 829117ae2e55 -r a4c9e342ffaf configure.ac --- a/configure.ac Tue Jul 19 16:46:09 2016 -0500 +++ b/configure.ac Fri Jul 22 12:11:39 2016 +0200 @@ -73,12 +73,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