Skip to content

Commit 32d95c9

Browse files
committed
Fix Makefile $(BUILDPYTHON) rule
1 parent 223449f commit 32d95c9

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
@@ -784,7 +784,10 @@ clinic-tests: check-clean-src $(srcdir)/Lib/test/clinic.test.c
784784
# Build the interpreter
785785
$(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
786786
echo "BUILDPYTHON: run $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)"
787-
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
787+
@ # Use -o $(BUILDPYTHON) instead of -o $@ to write the program in the
788+
@ # build directory instead of the source directory with FreeBSD make
789+
@ # (gh-103053).
790+
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $(BUILDPYTHON) Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
788791
echo "BUILDPYTHON: BUILDPYTHON=$(BUILDPYTHON) target=$@"
789792
echo "BUILDPYTHON: built successfully"
790793
echo "BUILDPYTHON: pwd"

0 commit comments

Comments
 (0)