Skip to content

Commit 39fc9b1

Browse files
committed
gh-103053: Fix BUILDPYTHON target of Makefile
The BUILDPYTHON target of Makefile now uses "-o $(BUILDPYTHON)" instead of "-o $@". On FreeBSD when Python is built out of tree, "$@" contains the source directory, whereas the build directory is expected.
1 parent 3c0f65e commit 39fc9b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile.pre.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,10 @@ clinic-tests: check-clean-src $(srcdir)/Lib/test/clinic.test.c
783783

784784
# Build the interpreter
785785
$(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
786-
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
786+
@ # gh-103053: Use "-o $(BUILDPYTHON)" instead of "-o $@".
787+
@ # On FreeBSD when Python is built out of tree, $@ contains the source
788+
@ # directory, whereas the build directory is expected.
789+
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $(BUILDPYTHON) Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
787790

788791
platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
789792
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform

0 commit comments

Comments
 (0)