Skip to content

Conversation

@mcepl
Copy link
Contributor

@mcepl mcepl commented Jan 21, 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: #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
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 c3fe01e to 382b56d Compare January 26, 2026 15:00
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