Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90c8d06

Browse files
- Issue #17031: Fix running regen in cross builds.
2 parents 20190e2 + a10e4a9 commit 90c8d06

5 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lib/plat-generic/regen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#! /bin/sh
22
set -v
3-
python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
3+
eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" /usr/include/netinet/in.h

Makefile.pre.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ BUILDPYTHON= python$(BUILDEXE)
203203

204204
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
205205
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
206-
HOST_GNU_TYPE= @host@
206+
BUILD_GNU_TYPE= @build@
207+
HOST_GNU_TYPE= @host@
207208

208209
# The task to run while instrument when building the profile-opt target
209210
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
@@ -1123,6 +1124,12 @@ $(srcdir)/Lib/$(PLATDIR):
11231124
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
11241125
export EXE; EXE="$(BUILDEXE)"; \
11251126
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
1127+
export PYTHON_FOR_BUILD; \
1128+
if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
1129+
PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
1130+
else \
1131+
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
1132+
fi; \
11261133
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
11271134

11281135
python-config: $(srcdir)/Misc/python-config.in

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ Tests
752752
Build
753753
-----
754754

755+
- Issue #17031: Fix running regen in cross builds.
756+
755757
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
756758

757759
- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;

configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,6 +2926,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
29262926

29272927

29282928

2929+
2930+
29292931
if test "$cross_compiling" = yes; then
29302932
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
29312933
$as_echo_n "checking for python interpreter for cross build... " >&6; }

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ AC_CONFIG_SRCDIR([Include/object.h])
5050
AC_CONFIG_HEADER(pyconfig.h)
5151

5252
AC_CANONICAL_HOST
53+
AC_SUBST(build)
54+
AC_SUBST(host)
5355

5456
if test "$cross_compiling" = yes; then
5557
AC_MSG_CHECKING([for python interpreter for cross build])

0 commit comments

Comments
 (0)