Update sysroots - #46
Open
thevar1able wants to merge 4 commits into
Open
Conversation
linux-s390x: remove libcrypto/libssl/libcrypt (ClickHouse builds OpenSSL from sources), the duplicate s390x-linux-gnu/lib/gcc tree (clang only looks at lib/gcc/<triple>), and libgcc_eh.a / libgcc_s.so (never linked: ClickHouse uses -nodefaultlibs and its own compiler-rt). linux-aarch64: the shared objects are only opened by the linker for symbol resolution; their DWARF sections were ~20 MB of dead weight.
FreeBSD 13 is end-of-life and its releases are no longer on the main download mirror. All three sysroots are refreshed from https://download.freebsd.org/releases/{amd64,arm64/aarch64,powerpc/powerpc64le}/14.5-RELEASE/base.txz refresh-freebsd-sysroot.sh now also: - extracts only usr/include, usr/lib and lib from base.txz; - drops usr/include/c++ (ClickHouse builds its own libc++) and usr/include/private; - drops the static libc.a / libm.a / librt.a (FreeBSD binaries are linked dynamically); - copies Scrt1.o / crtbeginS.o / crtendS.o for PIE links; - finds librt.so in lib/ (moved there in FreeBSD 14); - handles the arm64/aarch64 and powerpc/powerpc64le mirror layout. The target triples in the main repository must be *-freebsd14 to match.
Add refresh-debian-sysroot.sh: fetches libc6, libc6-dev, linux-libc-dev and the default libgcc-<N>-dev for the target architecture in a throwaway Debian container, unpacks them and keeps only what the clang cross build needs (headers, startup objects, libgcc.a, the shared libc/libm and the libpthread/librt/libdl stubs). The result has Debian merged-/usr layout and a SOURCE.txt with the exact package versions. Two Debian 13 details are handled: linux-libc-dev is Architecture: all and ships usr/include/<triple>/asm as symlinks into usr/lib/linux/uapi, which are materialised as real files; and the libc.so linker script names ld.so by absolute path, so the lib -> usr/lib and lib64 -> usr/lib64 symlinks are created. linux-riscv64: Debian 13 (trixie), glibc 2.41-12+deb13u3, linux-libc-dev 6.12.94-1, gcc 14. Replaces a 2020 Debian sid snapshot (glibc 2.32, kernel 5.4). The gcc directory moved under usr/, so the toolchain file in the main repository passes --gcc-toolchain=<sysroot>/usr. linux-loongarch64: Debian sid, glibc 2.43-5, linux-libc-dev 7.1.13-1, gcc 16. Replaces glibc 2.36 / kernel 6.1. loong64 is not part of Debian 13.
Document which files every sysroot must contain and why, where each sysroot comes from (distribution, glibc, kernel headers, GCC version), which ones are frozen because they define the glibc floor of the release binaries, and the exact procedure to refresh each of them or add a new target.
thevar1able
force-pushed
the
update-sysroots-2026-09
branch
from
September 9, 2026 14:51
2777e68 to
8dd5435
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.