]> granicus.if.org Git - python/commitdiff
Issue #27490: Do not build pgen when cross-compiling
authorMartin Panter <vadmium+py@gmail.com>
Thu, 28 Jul 2016 01:28:27 +0000 (01:28 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Thu, 28 Jul 2016 01:28:27 +0000 (01:28 +0000)
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.

Patch by Thomas Perl.

Makefile.pre.in
Misc/ACKS
Misc/NEWS
configure
configure.ac

index 369b330d7454b1930c76baa36cde84e60a96bb05..d30e565dd4903903a3e5730e44ded616e6970208 100644 (file)
@@ -789,7 +789,7 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
 
 $(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 \
index 2b32fb862c5446f0edae6baccf14c9a3c8654dd0..a4a4cdc3cb47af7d1551fb19565daf65554e4bb2 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1120,6 +1120,7 @@ Steven Pemberton
 Bo Peng
 Santiago Peresón
 George Peristerakis
+Thomas Perl
 Mathieu Perreault
 Mark Perrego
 Trevor Perrin
index 3ac2ed3400200653de54a2177fd831e78975dda4..799e1f0d47155fbde162e9b93a9cb8680d1a79e9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -145,6 +145,9 @@ Windows
 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.
 
index 550c1bbd2da0b67b4a13bfb782ab082f018a0c04..f0cf515c28d241ae7d62d1c0cd5029e757cd1187 100755 (executable)
--- a/configure
+++ b/configure
@@ -739,6 +739,7 @@ UNIVERSALSDK
 CONFIG_ARGS
 SOVERSION
 VERSION
+PGEN_DEPENDENCY
 PYTHON_FOR_BUILD
 PYTHON_FOR_GEN
 host_os
@@ -3049,14 +3050,17 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
 $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'
+    PGEN_DEPENDENCY='$(PGEN)'
 fi
 
 
 
+
 if test "$prefix" != "/"; then
     prefix=`echo "$prefix" | sed -e 's/\/$//g'`
 fi
index bf27ab85df138260ee49d0ae3789dcee22a97271..bf2a348f8257cbf304d2907ee9f7007441e67461 100644 (file)
@@ -81,12 +81,15 @@ if test "$cross_compiling" = yes; then
         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