Skip to content

Validate GCC runtime symbol versions in Linux distributions - #1376

Draft
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:validate-libgcc-symbol-versions
Draft

zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:validate-libgcc-symbol-versions

Conversation

@zaniebot

Copy link
Copy Markdown
Contributor

ELF validation limits GLIBC_* symbol versions but does not limit the GCC_* versions required from the allowed libgcc_s.so.1. This lets distributions pass with compiler-runtime dependencies unavailable on supported systems, including the GCC_11.0 and GCC_12.0.0 requirements introduced by native _Float16 conversions in the Python 3.16.0a1 AArch64 and x86-64 GNU/Linux builds, respectively.

Apply target-specific GCC_* limits to GNU/Linux targets that allow libgcc_s.so.1: GCC_4.8.0 on x86-64, GCC_4.7.0 on ARMv7 and AArch64, and GCC_7.0.0 on RISC-V, based on the Buster sysroot.

@jjhelmus

Copy link
Copy Markdown
Contributor

Note: This should only be merged alone with a fix for the symbols. This will fail for 3.16

@jjhelmus jjhelmus closed this Oct 21, 2026
@jjhelmus jjhelmus reopened this Oct 21, 2026
jjhelmus added a commit that referenced this pull request Oct 23, 2026
Statically link the helper functions used for half-precision conversions
used in Python 3.16 from libgcc.a.

This is not needed when cross-compiling as only an older libgcc is
available in the sysroot. Native builds have the newer libgcc that is
included in the LLVM bundle.

Include checks for GCC symbol versions during validation. 
Cherry-picked from #1376

---------

Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants