Issue #27490: Merge pgen cross-compile logic from 3.5
This commit is contained in:
commit
4b53359090
|
@ -791,7 +791,7 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
|
||||||
|
|
||||||
$(IO_OBJS): $(IO_H)
|
$(IO_OBJS): $(IO_H)
|
||||||
|
|
||||||
$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
|
$(GRAMMAR_H): $(GRAMMAR_INPUT) @PGEN_DEPENDENCY@
|
||||||
@$(MKDIR_P) Include
|
@$(MKDIR_P) Include
|
||||||
# Avoid copying the file onto itself for an in-tree build
|
# Avoid copying the file onto itself for an in-tree build
|
||||||
if test "$(cross_compiling)" != "yes"; then \
|
if test "$(cross_compiling)" != "yes"; then \
|
||||||
|
|
|
@ -1131,6 +1131,7 @@ Steven Pemberton
|
||||||
Bo Peng
|
Bo Peng
|
||||||
Santiago Peresón
|
Santiago Peresón
|
||||||
George Peristerakis
|
George Peristerakis
|
||||||
|
Thomas Perl
|
||||||
Mathieu Perreault
|
Mathieu Perreault
|
||||||
Mark Perrego
|
Mark Perrego
|
||||||
Trevor Perrin
|
Trevor Perrin
|
||||||
|
|
|
@ -80,6 +80,9 @@ Windows
|
||||||
Build
|
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
|
- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
|
||||||
used for file generation during the build.
|
used for file generation during the build.
|
||||||
|
|
||||||
|
|
|
@ -740,6 +740,7 @@ UNIVERSALSDK
|
||||||
CONFIG_ARGS
|
CONFIG_ARGS
|
||||||
SOVERSION
|
SOVERSION
|
||||||
VERSION
|
VERSION
|
||||||
|
PGEN_DEPENDENCY
|
||||||
PYTHON_FOR_BUILD
|
PYTHON_FOR_BUILD
|
||||||
PYTHON_FOR_GEN
|
PYTHON_FOR_GEN
|
||||||
host_os
|
host_os
|
||||||
|
@ -3050,14 +3051,17 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
|
||||||
$as_echo "$interp" >&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
|
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
|
fi
|
||||||
|
PGEN_DEPENDENCY=''
|
||||||
elif test "$cross_compiling" = maybe; then
|
elif test "$cross_compiling" = maybe; then
|
||||||
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
|
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
|
||||||
else
|
else
|
||||||
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
|
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
|
||||||
|
PGEN_DEPENDENCY='$(PGEN)'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "$prefix" != "/"; then
|
if test "$prefix" != "/"; then
|
||||||
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
|
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -81,12 +81,15 @@ if test "$cross_compiling" = yes; then
|
||||||
AC_MSG_RESULT($interp)
|
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
|
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
|
fi
|
||||||
|
PGEN_DEPENDENCY=''
|
||||||
elif test "$cross_compiling" = maybe; then
|
elif test "$cross_compiling" = maybe; then
|
||||||
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
|
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
|
||||||
else
|
else
|
||||||
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
|
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
|
||||||
|
PGEN_DEPENDENCY='$(PGEN)'
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PYTHON_FOR_BUILD)
|
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 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
|
dnl it does, we get path names containing '//' which is both ugly and
|
||||||
|
|
Loading…
Reference in New Issue