diff --git a/Makefile.pre.in b/Makefile.pre.in index 8531162943ae35..bf01f7ff4f835c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1926,6 +1926,13 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ -o $@ $(srcdir)/Modules/getbuildinfo.c +ifdef UNVERSIONED_COMPILER +Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) \ + -DCOMPILER='"$(UNVERSIONED_COMPILER)"' \ + -o $@ $(srcdir)/Python/getcompiler.c +endif + Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS) $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ -DPREFIX='"$(host_prefix)"' \ diff --git a/Misc/NEWS.d/next/Build/2026-01-21-19-28-11.gh-issue-144121.gaqpK-.rst b/Misc/NEWS.d/next/Build/2026-01-21-19-28-11.gh-issue-144121.gaqpK-.rst new file mode 100644 index 00000000000000..d830d100b75d27 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-01-21-19-28-11.gh-issue-144121.gaqpK-.rst @@ -0,0 +1,2 @@ +Make it possible for the COMPILER definition in getcompiler.c to be static +in order to make builds reproducible.