#36193 guix: introduce a minimal `linux-base-gcc` variant
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36193 guix: introduce a minimal `linux-base-gcc` variant | Ready | 0 | Positive | 22 + 13 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Introduces a minimal `linux-base-gcc` toolchain variant in Guix for non-GUI static Linux builds, disabling unused `libstdc++` features (`--disable-wchar_t`, `--enable-clocale=generic`, and `--with-libstdcxx-zoneinfo=no`). It also disables the experimental `libstdc++fs` library across Linux GCC builds and adds a patch in `depends` so Boost Test compiles without `std::wcrtomb`.
Problem: Guix non-GUI Linux release binaries link unused `libstdc++` components such as wide-character handling, timezone info, and the experimental filesystem TS library, unnecessarily inflating binary sizes.
Evidence of importance:
- Author measurements demonstrate ~0.48 MB size reductions across non-GUI binaries (bitcoind drops from 17.75 MB to 17.27 MB, bitcoin-cli from 8.20 MB to 7.72 MB).
Risk of a mistake: medium (build). Altering GCC libstdc++ compilation flags affects release binaries and could cause runtime breakages if non-GUI code relies on disabled standard library features.
Changed since the previous assessment: Dropped commits associated with PR #36531 (including changes to Guix module loading via `--load-path`), removing the dependency on that PR.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- author: response to hebasto's review comments and question 2026-10-31
Agreement
Positive
support without stated reasons, no open objection (hebasto)
Thread notes: Added hebasto's review comments suggesting not exporting internal Guix toolchain definitions and questioning the need to disable libstdc++ features on gcc-cross-sans-libc.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| hebasto (member) | question, interface | whether --disable-wchar_t is a libstdc++ configure option rather than a GCC one | answered · fanquake explained it is passed through GCC and clarified the commit message | answered | yes | 2026-09-08: 'Isn't `--disable-wchar_t` a `libstdc++` configure option rather than a GCC one?' Status from: 2026-09-09: fanquake: 'Yes, and we are passing that option through GCC. I will make the commit message clearer.' |
| hebasto (member) | suggestion, safety | check for potential side effects of Boost wchar macros on Boost.MultiIndex | open | answered | no | 2026-09-16: 'It might be worth checking for potential side effects of those macros on Boost.MultiIndex.' |
| hebasto (member) | suggestion, interface | do not export linux-base-gcc and linux-base-gcc-minimal as they are only used in toolchains.scm | open | answered | no | 2026-10-31: '`linux-base-gcc` seems to be used only in `toolchains.scm`. So there is no need to export it' |
| hebasto (member) | question, approach | whether disabling libstdc++ features on gcc-cross-sans-libc-... is intentional given it is already configured with --disable-libstdc++-v3 | open | answered | no | 2026-10-31: 'Is adding this line intentional? Disabling libstdc++ features doesn’t seem to affect the `gcc-cross-sans-libc-...` package, as Guix configures it with `--disable-libstdc++-v3`.' |
Support:
- hebasto (member) (Concept ACK, 2026-09-16): Concept ACK [not substantive]
Participants:
- hebasto (member, support, 8 statements 2026-09-08 to 2026-10-31): Concept ACK, verified Guix build, asked about configure options and gcc-cross-sans-libc, and suggested not exporting unneeded symbols
- willcl-ark (member, neutral, 3 statements 2026-09-09 to 2026-10-22): reported Guix build hashes
- rustaceanrob (member, neutral, 1 statements 2026-09-10 to 2026-09-10): reported Guix build hashes
Files
15 lines under test/bench/ci.
- depends/patches/boost/drop_wcrtomb_wchar_t.patch +17/-0
- contrib/guix/toolchains.scm +10/-1
- depends/packages/boost.mk +5/-0
- contrib/guix/linux_static.scm +3/-1
Card
The short text the ranking pass compares across PRs.
Introduces a minimal linux-base-gcc toolchain variant for non-GUI Linux static Guix builds, disabling unused libstdc++ features including wide-character support, zoneinfo, and the filesystem TS library. It also patches Boost Test in depends to invoke wcrtomb without std namespace qualification to maintain compatibility without wchar_t support. This reduces release binary sizes for tools like bitcoind and bitcoin-cli by roughly 0.5 MB.
Data
thread read through 2026-10-31 (18 statements), head 0f07034e6c
labels: Build system
Categories
Build and CI
P3 · cleanup
Reduces static non-GUI Linux binary sizes by ~0.48 MB by stripping unused `libstdc++` components in a minimal GCC toolchain variant. The PR description provides measurements demonstrating reductions across binaries (e.g. `bitcoind` from 17.75 MB to 17.27 MB, `bitcoin-cli` from 8.20 MB to 7.72 MB); while beneficial, binary size pruning is a deferrable optimization.
Membership: Matches the 'Build system' label and directly edits Guix build configurations (`contrib/guix/`) and depends packages (`depends/packages/boost.mk`).
Factors: security/stability 0, bug 0, performance 1, user value 1, leverage 0