Skip to content

gh-144121: Allow overriding COMPILER with UNVERSIONED_COMPILER#144124

Open
mcepl wants to merge 2 commits into
python:mainfrom
openSUSE-Python:COMPILER-getcompiler.c
Open

gh-144121: Allow overriding COMPILER with UNVERSIONED_COMPILER#144124
mcepl wants to merge 2 commits into
python:mainfrom
openSUSE-Python:COMPILER-getcompiler.c

Conversation

@mcepl

@mcepl mcepl commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Introduce UNVERSIONED_COMPILER variable in Makefile.pre.in to allow overriding the COMPILER macro definition during the build of Python/getcompiler.o.

This enables reproducible builds by providing a way to set a generic compiler identification string (e.g., "[GCC]") instead of the default versioned one.

The rule is made conditional on UNVERSIONED_COMPILER being defined.

References: https://discuss.python.org/t/unversioned-compiler-symbol-for-getcompiler-c/91735
Fixes: #144121

@mcepl mcepl changed the title Allow overriding COMPILER with UNVERSIONED_COMPILER gh-144124: Allow overriding COMPILER with UNVERSIONED_COMPILER Jan 21, 2026
@mcepl mcepl force-pushed the COMPILER-getcompiler.c branch from 6f12a2b to a787988 Compare January 21, 2026 18:31
@mcepl mcepl changed the title gh-144124: Allow overriding COMPILER with UNVERSIONED_COMPILER gh-144121: Allow overriding COMPILER with UNVERSIONED_COMPILER Jan 21, 2026
@mcepl mcepl force-pushed the COMPILER-getcompiler.c branch 2 times, most recently from 51bb66b to 39f408f Compare January 21, 2026 18:34
@hugovk hugovk added the build The build process and cross-build label Jan 21, 2026
@mcepl mcepl force-pushed the COMPILER-getcompiler.c branch from c3fe01e to 382b56d Compare January 26, 2026 15:00
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 5, 2026
Introduce UNVERSIONED_COMPILER variable in Makefile.pre.in to allow
overriding the COMPILER macro definition during the build of
Python/getcompiler.o.

This enables reproducible builds by providing a way to set a generic
compiler identification string (e.g., "[GCC]") instead of the default
versioned one.

The rule is made conditional on UNVERSIONED_COMPILER being defined.

References: https://discuss.python.org/t/unversioned-compiler-symbol-for-getcompiler-c/91735
Fixes: python#144121
@mcepl mcepl force-pushed the COMPILER-getcompiler.c branch from 382b56d to f5e8c6b Compare May 5, 2026 14:11
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label May 17, 2026
@mcepl mcepl requested a review from itamaro as a code owner July 14, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review build The build process and cross-build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make COMPILER definition in getcompiler.c optionally static for reproducible builds

2 participants