Skip to content

toolchain roots from bootstrap gen-4 (both arches: linux_headers, binutils, glibc, gcc) - #983

Closed
bryan-minimal wants to merge 5 commits into
mainfrom
bryan/gen1-amd64-roots
Closed

bryan-minimal wants to merge 5 commits into
mainfrom
bryan/gen1-amd64-roots

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

The pkgs toolchain roots now come from a bootstrap generation: on both arches, linux_headers, binutils, glibc and gcc (and the amd64 -glibc siblings) pin gen-4 of gominimal/bootstrap instead of the hand-sealed bedrock tarballs.

What a generation is

  • Built from source. Every package is built from the hex0 seed through the full ladder (mes → tcc → musl → gcc 4.x → 10.4.0 → 15.2.0 → glibc 2.42 → the glibc toolchain), in the real mip sandbox.
  • Reproduced before publishing. Each package was built on two independent machines (amd64: an AMD EPYC c4d and an Intel c3; arm64: two Axion VMs). Their trees had to match byte for byte before anything was published.
  • Verified after upload. The artifacts live in gs://minimal-bootstrap/gen-4/sha256/<sha>/…, public read and create-only, so a published object cannot change. Each is listed in generations/gen-4/manifest.json and MANIFEST.txt, and all 51 were downloaded anonymously and checked.

amd64

The same objects as gen-3 (spec hashes unchanged in bootstrap), re-listed under gen-4. Compared with the gen-0 tarballs file by file: linux_headers all 2050 entries identical; binutils the same 193 entries with only the 46 programs rebuilt; gcc the same 1782 entries with 73 (compilers and runtime libraries) differing; glibc publishes its whole /usr tree, so the cycle-breaker's top-level usr/lib/*.{so*,a} and crt*.o are present.

arm64

New in this revision. gen-4 is the first generation where arm takes nothing from the July bedrock tarballs:

  • linux_headers → stage0-linux-headers-6.12.43: arm now builds its own kernel UAPI headers (previously the gen-0 slot was reused). The result matches that slot entry for entry, all 1992 files.
  • binutils → binutils-2.41, glibc → glibc-bedrock-2.42, gcc → gcc-15.2.0-glibc: installed at /usr, the layout of the slots they replace.

Cost

mip dump against main: amd64 583 of 640 spec hashes change, arm64 550 of 638. The roots' content is largely identical, but a new Source sha moves every hash under it; this is the one world rebuild the plan budgets for.

This CI run is the real test of the gen-4 roots on both arches. Draft until it is green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates
    • Refreshed prebuilt Binutils, GCC, glibc, and Linux headers for x86-64 and AArch64 to use generation-4 bootstrap archives.
    • Updated archive integrity checks for the refreshed packages.
    • Updated sealed x86-64 Binutils, GCC, and glibc artifacts to use generation-4 bootstrap archives.

… gen-1

The amd64 prebuilts of linux_headers, binutils (and binutils-2.46-glibc) and gcc (and
gcc-15.2.0-glibc) now point at gen-1 of gominimal/bootstrap in gs://minimal-bootstrap: built
from the hex0 seed, every package reproduced byte for byte on two independent machines (AMD EPYC
and Intel), and checked against the published manifest after upload.

Against the gen-0 tarballs they replace, file by file:
- linux_headers: all 2050 entries identical.
- binutils-2.46-glibc: the same 193 entries; libraries, scripts and headers identical, the 46
  programs rebuilt by gen-1's gcc.
- gcc-15.2.0-glibc: the same 1782 entries; 73 differ (the compilers and runtime libraries).

glibc stays on gen-0: glibc's cycle-breaker takes the top-level usr/lib libraries and crt objects
from the bedrock tarball, and gen-1's glibc-bedrock-2.42 ships only its declared outputs (the
versioned sysroot). arm64 is unchanged (0 spec hashes move); amd64 rebuilds 564 of 624.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b881e35 and f71e81f.

Files selected for processing: 7
  • packages/binutils-2.46-glibc/build.ncl
  • packages/binutils/build.ncl
  • packages/gcc-15.2.0-glibc/build.ncl
  • packages/gcc/build.ncl
  • packages/glibc-bedrock-2.42/build.ncl
  • packages/glibc/build.ncl
  • packages/linux_headers/build.ncl

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The binutils, GCC, glibc, and linux_headers package definitions now select gen-4 bootstrap archives instead of staging or Bedrock archives. The changes update archive URLs and SHA-256 values. Existing extraction settings and sealed build configurations remain unchanged.

Changes: Gen-4 bootstrap artifact updates

Layer / File(s) Summary
Update package artifact sources
packages/linux_headers/build.ncl, packages/binutils/build.ncl, packages/binutils-2.46-glibc/build.ncl, packages/glibc/build.ncl, packages/glibc-bedrock-2.42/build.ncl, packages/gcc/build.ncl, packages/gcc-15.2.0-glibc/build.ncl
The package definitions now select gen-4 bootstrap archives and updated SHA-256 values. Architecture-specific entries remain in place, and extraction settings are unchanged.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • gominimal/minimermetic issue 89 — The PR changes several root artifact selections to gen-4 bootstrap archives, which aligns with the issue’s root-replacement objective. The issue also calls for other slot and arm64 graph changes not covered here.
  • gominimal/bootstrap issue 1 — The PR uses gen-4 bootstrap artifacts for the four named roots on both architectures, matching the issue’s generation mechanism.

Suggested reviewers: msample

Merge Risk: Minimal · up to f71e8

No actionable issue is identified in the gen-4 artifact pins. The change is ready for normal CI validation on both architectures.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: moving both architectures’ toolchain roots to bootstrap generation 4 for linux_headers, binutils, glibc, and gcc.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (7 skipped: 7 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

bryan-minimal and others added 2 commits October 22, 2026 20:29
linux_headers, binutils and gcc move from gen-1 to gen-3's names (the same artifacts: gen-3's
amd64 rebuild reproduced them byte for byte). glibc (and glibc-bedrock-2.42) now flips too: gen-3's
glibc-bedrock-2.42 carries its top-level usr/lib libraries and crt objects, which glibc's
cycle-breaker reads, in gen-0's 4087-entry layout. arm64 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal bryan-minimal changed the title amd64 toolchain roots from bootstrap gen-1: linux_headers, binutils, gcc toolchain roots from bootstrap gen-3 (amd64: linux_headers, binutils, glibc, gcc) Oct 23, 2026
@bryan-minimal

Copy link
Copy Markdown
Member Author

Updated to gen-3 (7ec3ba0), and glibc now flips too.

  • linux_headers, binutils, gcc: gen-3 names. These are the same artifacts as before: gen-3's amd64 rebuild, on an AMD c3d and an Intel c3, reproduced 26 of 28 amd64 tarballs byte for byte against gen-1.
  • glibc and glibc-bedrock-2.42: gen-3's glibc-bedrock-2.42 publishes its whole /usr tree, including the top-level usr/lib libraries and crt objects that glibc's cycle-breaker reads. Its layout matches gen-0's tarball entry for entry (4087). The only differences are two libm scripts in the versioned sysroot and symlink mode bits.
  • arm64 is still unchanged. Its roots come next, once the arm ladder builds its own kernel headers instead of taking gen-0's.

🤖 Generated with Claude Code

bryan-minimal and others added 2 commits October 25, 2026 12:02
amd64 moves from gen-3 to gen-4; the objects are the same bytes, re-listed under
the new generation. arm64 leaves the July bedrock tarballs: linux_headers,
binutils, glibc and gcc now pin gen-4, where arm builds its own kernel UAPI
headers and the toolchain roots install at /usr like the slots they replace.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bryan-minimal bryan-minimal changed the title toolchain roots from bootstrap gen-3 (amd64: linux_headers, binutils, glibc, gcc) toolchain roots from bootstrap gen-4 (both arches: linux_headers, binutils, glibc, gcc) Oct 25, 2026
@bryan-minimal
bryan-minimal marked this pull request as ready for review October 25, 2026 23:14
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 25, 2026 23:14

@mitodrummer mitodrummer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked all eight new root URLs and sha256s against gominimal/bootstrap generations/gen-4/manifest.json: each URL matches a manifest entry exactly, the sha in the path equals the sha256 field, every entry is listed as reproduced on two machines, and each slot maps to the right package per arch (arm64 binutils-2.41, glibc-bedrock-2.42, gcc-15.2.0-glibc, stage0-linux-headers-6.12.43). The diff touches only Source url/sha256 and comments, and the full world build on this head is green. The ~580-per-arch rehash is the planned world rebuild described in the body.

@bryan-minimal

Copy link
Copy Markdown
Member Author

Superseded by #1242, which merges this branch and repoints every bootstrap pin at gen-11 of gominimal/bootstrap. Closing to stop the duplicate world rebuilds; the branch stays.

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