Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ prefix= @prefix@
# Install prefix for architecture-dependent files
exec_prefix= @exec_prefix@

# For cross compilation, we distinguish between "prefix" (where we install the
# files) and "host_prefix" (where getpath.c expects to find the files at
# runtime)
host_prefix= @host_prefix@
host_exec_prefix= @host_exec_prefix@


# Install prefix for data files
datarootdir= @datarootdir@

Expand Down Expand Up @@ -1740,8 +1747,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \

Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS)
$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
-DPREFIX='"$(prefix)"' \
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DPREFIX='"$(host_prefix)"' \
-DEXEC_PREFIX='"$(host_exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
-DPLATLIBDIR='"$(PLATLIBDIR)"' \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
For cross builds, there is now support for having a different install
``prefix`` than the ``host_prefix`` used by ``getpath.py``. This is set to ``/`` by
default for Emscripten, on other platforms the default behavior is the same
as before.
25 changes: 25 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,25 @@ then
fi
AC_MSG_RESULT(["$MACHDEP"])

dnl For cross compilation, we distinguish between "prefix" (where we install the
dnl files) and "host_prefix" (where we expect to find the files at runtime)

if test -z "$host_prefix"; then
AS_CASE([$ac_sys_system],
[Emscripten], [host_prefix=/],
[host_prefix='${prefix}']
)
fi
AC_SUBST([host_prefix])

if test -z "$host_exec_prefix"; then
AS_CASE([$ac_sys_system],
[Emscripten], [host_exec_prefix=$host_prefix],
[host_exec_prefix='${exec_prefix}']
)
fi
AC_SUBST([host_exec_prefix])

# On cross-compile builds, configure will look for a host-specific compiler by
# prepending the user-provided host triple to the required binary name.
#
Expand Down
Loading