Skip to content

Update sysroots - #46

Open
thevar1able wants to merge 4 commits into
masterfrom
update-sysroots-2026-09
Open

Update sysroots#46
thevar1able wants to merge 4 commits into
masterfrom
update-sysroots-2026-09

Conversation

@thevar1able

Copy link
Copy Markdown
Member

No description provided.

@CLAassistant

CLAassistant commented Sep 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants