Skip to content

Commit f44c355

Browse files
committed
gh-161364: Mark Setup.bootstrap's modules with a *bootstrap* line
The rule of a Makefile from before gh-160689 regenerates the Makefile by calling makesetup without -b. That left BOOTSTRAP_MODOBJS empty, and Programs/_freeze_module failed to link until the Makefile was regenerated again. A *bootstrap* line in Setup.bootstrap.in marks the modules either way.
1 parent e891a91 commit f44c355

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix ``Programs/_freeze_module`` failing to link with undefined symbols after
2+
the Makefile is regenerated by the rule of a Makefile from before
3+
:gh:`160689`, for example after ``git pull`` or when switching a build
4+
directory from 3.15.

‎Modules/Setup.bootstrap.in‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# -*- makefile -*-
22

3+
# These are the bootstrap modules, which makesetup gets with -b. The line
4+
# below says so as well, for the recipe of a Makefile from before -b
5+
# existed, which passes this file without it (gh-161364).
6+
*bootstrap*
7+
38
# ---
49
# Built-in modules required to get a functioning interpreter;
510
# cannot be built as shared!

‎Modules/makesetup‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ set -e
1919
# The Setup file following a -b option holds the *bootstrap* modules:
2020
# the static modules that the build helper programs (_freeze_module,
2121
# _bootstrap_python) are linked with. They are also regular modules of
22-
# the final build.
22+
# the final build. A *bootstrap* line in a Setup file does the same for
23+
# the rest of that file.
2324
# Setup files after a -n option are used for their variables, modules
2425
# and libraries but not for their .o files.
2526
#

0 commit comments

Comments
 (0)