Skip to content

Commit 9e1f4f5

Browse files
committed
docs: the compiler ships a capability; mcpp supplies the policy (2026.8.8.2)
08-toolchain-internals had two sections that stopped being true when the specs rewrite was removed. §4's gcc row still promised a specs rewrite; §5 described the clang cfg as if bypassing an install-time configuration were a clang-specific accommodation rather than the rule both compilers now follow. Rewritten as one policy with two mechanisms (`--no-default-config` for clang, a generated `-specs=` for gcc), including what removing gcc's baked `*link:` takes away and therefore what mcpp has to put back. New §2.1 documents where the runtime binding comes from, since it is now a resolution with an authority rather than a directory scan, and since "no binding declines payload-first" is surprising unless the reason is written down. 05-mcpp-toml notes that `[xlings] subos` picks the runtime too -- it was already a key, but it did not previously decide this. CHANGELOG gains 2026.8.8.2 and, separately, 2026.8.8.1, which shipped without an entry. xlings pin 2026.8.6.3 -> 2026.8.7.1: upstream is at 2026.8.8.1, but xim-pkgindex does not carry it yet and pinning ahead of the index makes every CI job install a version that is not there.
1 parent bc36d6c commit 9e1f4f5

15 files changed

Lines changed: 249 additions & 39 deletions

.github/actions/bootstrap-mcpp/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ inputs:
2525
# `package.name`, so one of the two was simply unreachable — and which one
2626
# depended on the machine, which is why CI failed on `compat:lua` on
2727
# Windows and `mcpplibs.capi:lua` on Linux. Never pin below that.
28-
default: '2026.8.6.3'
28+
default: '2026.8.7.1'
2929
cache-target:
3030
description: also restore/save target/ (build artifacts + BMIs)
3131
required: false

.github/actions/setup-macos-llvm/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
# Floor imposed by the index, not a routine bump — see
1616
# .github/actions/bootstrap-mcpp/action.yml for why 0.4.69 is required
1717
# (two packages named `lua` in one repo need openxlings/xlings#381).
18-
default: '2026.8.6.3'
18+
default: '2026.8.7.1'
1919

2020
runs:
2121
using: composite

.github/workflows/bootstrap-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Dormant (workflow_dispatch only), but kept in step with the rest —
1818
# check_version_pins.sh holds it there. Floor: 0.4.69, below which the
1919
# index cannot resolve two packages that share a short name.
20-
XLINGS_VERSION: '2026.8.6.3'
20+
XLINGS_VERSION: '2026.8.7.1'
2121
steps:
2222
- uses: actions/checkout@v4
2323

.github/workflows/ci-fresh-install.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
env:
153153
XLINGS_NON_INTERACTIVE: '1'
154154
run: |
155-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.6.3
155+
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.7.1
156156
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
157157
158158
- name: Install mcpp and config mirror
@@ -292,7 +292,7 @@ jobs:
292292

293293
- name: Install xlings + mcpp
294294
run: |
295-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.6.3
295+
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.7.1
296296
# Deliberately NOT writing to $GITHUB_PATH here. On container
297297
# images that declare no PATH in their config (opensuse/
298298
# tumbleweed), appending a single dir to GITHUB_PATH makes the
@@ -363,7 +363,7 @@ jobs:
363363
# (older ones carry minos=15 and refuse to start).
364364
# v0.4.51+: in-process sha256 — this image has no sha256sum
365365
# binary, so pinned fetches failed before it.
366-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.6.3
366+
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.7.1
367367
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
368368
369369
- name: Install mcpp and config mirror

.github/workflows/ci-linux-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
124124
- name: Bootstrap xlings + released mcpp
125125
run: |
126-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.6.3
126+
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.8.7.1
127127
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
128128
xlings update
129129
xlings install mcpp -y -g

.github/workflows/cross-build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
# release assets were uploaded in a broken state (records present,
119119
# blobs missing → 404 on GET); re-uploaded clean. The stale-INDEX
120120
# half is handled by the marker-clear below.
121-
XLINGS_VERSION: '2026.8.6.3'
121+
XLINGS_VERSION: '2026.8.7.1'
122122
run: |
123123
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
124124
curl -fsSL -o "/tmp/${tarball}" \
@@ -255,7 +255,7 @@ jobs:
255255
- name: Bootstrap mcpp via xlings
256256
env:
257257
XLINGS_NON_INTERACTIVE: '1'
258-
XLINGS_VERSION: '2026.8.6.3'
258+
XLINGS_VERSION: '2026.8.7.1'
259259
run: |
260260
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
261261
curl -fsSL -o "/tmp/${tarball}" \

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
# Pin xlings to a known-good version. The upstream install
9797
# script always grabs `latest` (no version override), so we
9898
# download + self-install manually to avoid broken releases.
99-
XLINGS_VERSION: '2026.8.6.3'
99+
XLINGS_VERSION: '2026.8.7.1'
100100
run: |
101101
if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
102102
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
@@ -288,7 +288,7 @@ jobs:
288288
- name: Bootstrap mcpp via xlings
289289
env:
290290
XLINGS_NON_INTERACTIVE: '1'
291-
XLINGS_VERSION: '2026.8.6.3'
291+
XLINGS_VERSION: '2026.8.7.1'
292292
run: |
293293
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
294294
curl -fsSL -o "/tmp/${tarball}" \
@@ -358,11 +358,11 @@ jobs:
358358
# below are pinned to the same version as XLINGS_VERSION; they are
359359
# NOT interpolated from it, so check_version_pins.sh scans for them
360360
# explicitly (they were absent from the old lock-step comment).
361-
XLA="xlings-2026.8.6.3-linux-aarch64.tar.gz"
361+
XLA="xlings-2026.8.7.1-linux-aarch64.tar.gz"
362362
if curl -fsSL -o "/tmp/$XLA" \
363-
"https://github.com/openxlings/xlings/releases/download/v2026.8.6.3/$XLA"; then
363+
"https://github.com/openxlings/xlings/releases/download/v2026.8.7.1/$XLA"; then
364364
tar -xzf "/tmp/$XLA" -C /tmp
365-
XLBIN=$(find /tmp/xlings-2026.8.6.3-linux-aarch64 -path '*/bin/xlings' -type f | head -1)
365+
XLBIN=$(find /tmp/xlings-2026.8.7.1-linux-aarch64 -path '*/bin/xlings' -type f | head -1)
366366
if [ -n "$XLBIN" ]; then
367367
mkdir -p "$STAGING/$WRAPPER/registry/bin"
368368
cp "$XLBIN" "$STAGING/$WRAPPER/registry/bin/xlings"
@@ -440,7 +440,7 @@ jobs:
440440
- name: Bootstrap mcpp via xlings
441441
env:
442442
XLINGS_NON_INTERACTIVE: '1'
443-
XLINGS_VERSION: '2026.8.6.3'
443+
XLINGS_VERSION: '2026.8.7.1'
444444
run: |
445445
if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
446446
WORK=$(mktemp -d)
@@ -622,7 +622,7 @@ jobs:
622622
shell: bash
623623
env:
624624
XLINGS_NON_INTERACTIVE: '1'
625-
XLINGS_VERSION: '2026.8.6.3'
625+
XLINGS_VERSION: '2026.8.7.1'
626626
run: |
627627
# Captured before the `cd` below, in POSIX form: this step never
628628
# returns to the workspace, and GITHUB_WORKSPACE is a backslash

CHANGELOG.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,71 @@
33
> 本文件追踪 `mcpp-community/mcpp` 公开仓的版本演进。
44
> 格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/)
55
6+
## [2026.8.8.2] — 2026-08-08
7+
8+
编译器交付的是**能力**,不是配置。设计与实测证据见
9+
`.agents/docs/2026-08-08-payload-version-and-contract-drift-design.md`
10+
11+
### 修复
12+
13+
- **产物加载哪个 glibc,现在有权威,不再靠目录顺序。**
14+
15+
payload-first 的构建要链接到某个具体 glibc。旧规则是问目录"那个 glibc"、
16+
`readdir` 的第一项——只装了一个时它永远对,所以从没有东西逼它对。一条带
17+
`xim:glibc@>=2.38` 的依赖就足以装进第二个:编译侧取了 2.44,而产物的
18+
interpreter(装机时冻结在 gcc specs 里)仍是 2.39,于是二进制引用
19+
`GLIBC_2.42` 符号却跑在没有它的运行时上,报错还落在与那条依赖无关的包上。
20+
21+
现在由 subos 自述的 runtime 作答(`[xlings] subos` 可指定),没有答案就**拒绝**
22+
走 payload-first,而不是挑一个。该绑定计入工具链指纹(11 字段),两次只在
23+
runtime 上不同的构建不再共用缓存。旧 subos 回落到工具链自身烙入的值。
24+
25+
- **不再改写 GCC 的 `specs`,产物也不再带别人机器的死路径。**
26+
27+
旧的 specs 重写用单路径 needle 配双路径 replacement,每个跑过它的 home 都漏下
28+
一条:一台开发机产出的每个 gcc 产物里都有 **68** 条陈旧 `RUNPATH`,全指向已删除
29+
`mktemp` 目录。改为 `-specs=` 一份逐构建生成的干净文件(`-dumpspecs` 取内建
30+
`*link:`,去掉 loader/rpath),loader 与 rpath 由 mcpp 显式写在链接行上。逐构建、
31+
不需写权限,继承来的只读 payload 也能用。e2e `201_gcc_no_specs_pollution.sh`
32+
断言的是产物而非 specs 文件。
33+
34+
- **落后于 pin 的 vendored xlings 会被替换——但只在替换品确实更新时。**
35+
36+
`acquire_xlings_binary` 过去见到文件存在就返回,于是一个 home 会永远留着它第一次
37+
获取的 xlings(实测 2026.8.2.1 对 pin 2026.8.6.3)。`subos_info` 是 2026.8.5.1
38+
才有的,所以那台机器上 subos 的自述一直被一个太旧的客户端丢弃。修复的第一版直接
39+
删了重取,结果把 2026.8.2.1 换成了系统的 0.4.51——更旧,且同样没有那个特性;现在
40+
先给替换品定价再动手。
41+
42+
- **`--sysroot` 的判据从"存在"改为"归属"。** gcc 把
43+
`--sysroot=<...>/.xlings/subos/default` 当字符串烙进去,而一台机器上有很多同名
44+
目录,所以那条烙入的路径经常存在、却属于另一个 checkout(实测:mcpp 里的构建解析
45+
到了无关仓库下的 sysroot)。
46+
47+
### 其他
48+
49+
- `mcpp self doctor` 新增两条检查:vendored xlings 落后于 pin;sysroot 既不属于本
50+
mcpp home 也不属于当前项目。
51+
- xlings pin 提升到 2026.8.7.1。
52+
53+
## [2026.8.8.1] — 2026-08-07
54+
55+
xlings 作为运行时底座:subos 环境到达程序,以及 self-contained 的
56+
`/proc/self/exe` 陷阱(#352#375)。设计见
57+
`.agents/docs/2026-08-07-xlings-as-runtime-substrate-design.md`
58+
59+
### 修复
60+
61+
- **subos 声明的环境变量现在真的到达被运行的程序(#352)。** 之前 mcpp 读的是自己
62+
想象出来的 `subos_info.envs` 线格式(数组),而 xlings 写的是以 binding 为键的
63+
对象,于是整条修复是空转的。现在按 xlings 实际写出的格式解析,并用逐字取自真实
64+
xlings 输出的 fixture 钉住。
65+
- **升级后的 mcpp 会重放升级前的缓存,导致 subos 环境丢失。** 快路径命中时不带
66+
subos 环境;该缺陷是靠一条"必须走快路径"的自证断言抓到的,而那条断言随即又抓到
67+
第二个:缓存行写在 `profile=` 之前却在 `cacheMode=` 之后解析。
68+
- **self-contained 打包的 `/proc/self/exe` 陷阱(#375)。** 新增 `MCPP_BUNDLE_DIR`
69+
契约。
70+
671
## [2026.8.7.1] — 2026-08-07
772

873
两处「模型比生态少一层」。设计与实测证据见 `.agents/docs/2026-08-07-windows-resources-and-version-identity-design.md`

docs/05-mcpp-toml.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,17 @@ build needs (`make`/`cmake`/`protoc`/…), pin tool versions per project, or set
966966
build-time env vars — without hand-editing `.xlings.json`. `[toolchain]` (§2.7) remains
967967
the ergonomic shorthand for the compiler; `[xlings.workspace]` is the general form.
968968

969+
`subos` carries a second meaning on Linux: it selects **which C runtime the
970+
build binds against**. A subos describes its own runtime (xlings 2026.8.5.1+),
971+
and mcpp takes that as the authority rather than looking around for a libc — so
972+
`subos = "el8"` and `subos = "trixie"` in two projects on one machine produce
973+
artifacts targeting each one's glibc, with the compile side and the run side
974+
guaranteed to agree. The binding is part of the toolchain fingerprint, so
975+
switching it rebuilds rather than reusing the other subos' objects. A subos
976+
older than that (or none at all) falls back to whatever the toolchain itself
977+
was installed against; `mcpp build -v` prints which of the two happened. See
978+
docs/08-toolchain-internals.md §2.1.
979+
969980
### 2.14 Host tools from a dependency (mcpp 2026.8.5.1+)
970981

971982
A package can build a binary its consumers need *at build time*`protoc`, a

0 commit comments

Comments
 (0)