Skip to content

Commit e811d8f

Browse files
committed
docs+test: finish the riscv64-linux-musl promotion
`mcpp toolchain list`'s sample output in docs/03-toolchains.md (+ zh) still showed riscv64-linux-musl as `— / planned`; the real output after the promotion is `gcc 16.1.0 / available`. Verified against a built binary, not transcribed. The row that used to illustrate the `planned` status is replaced by aarch64-linux-gnu so the block still shows all three states. 103_target_vocabulary.sh now reads its planned-tier target out of `toolchain list` instead of hardcoding one. That assertion is about the TIER; with a hardcoded triple every promotion silently turns it into a test of something else (riscv64-linux-musl was the second target to go that way), and the check degrades to a skip once no planned target is left.
1 parent 753d669 commit e811d8f

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

docs/03-toolchains.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ Targets:
101101
* x86_64-linux-musl static gcc 16.1.0 installed
102102
x86_64-windows-gnu PE, static, cross gcc 16.1.0 installed
103103
aarch64-linux-musl static, cross gcc 16.1.0 available
104-
riscv64-linux-musl static, cross — planned
104+
riscv64-linux-musl static, cross gcc 16.1.0 available
105+
aarch64-linux-gnu cross — planned
105106
106107
Available toolchains (run `mcpp toolchain install <family> <version>`):
107108
gcc 15.1.0 / 13.3.0 / 11.5.0 / 9.4.0

docs/zh/03-toolchains.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Targets:
9999
* x86_64-linux-musl static gcc 16.1.0 installed
100100
x86_64-windows-gnu PE, static, cross gcc 16.1.0 installed
101101
aarch64-linux-musl static, cross gcc 16.1.0 available
102-
riscv64-linux-musl static, cross — planned
102+
riscv64-linux-musl static, cross gcc 16.1.0 available
103+
aarch64-linux-gnu cross — planned
103104
104105
Available toolchains (run `mcpp toolchain install <family> <version>`):
105106
gcc 15.1.0 / 13.3.0 / 11.5.0 / 9.4.0

tests/e2e/103_target_vocabulary.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,23 @@ grep -q "did you mean 'x86_64-linux-musl'" "$TMP/typo.log" || {
2626
echo "FAIL: missing did-you-mean suggestion"; cat "$TMP/typo.log"; exit 1; }
2727

2828
# ── 2. planned tier: registered but unsupported → error, not a host build ───
29-
if "$MCPP" build --target aarch64-linux-gnu > "$TMP/planned.log" 2>&1; then
30-
echo "FAIL: planned-tier target built"; cat "$TMP/planned.log"; exit 1
29+
# The target is read out of `toolchain list` rather than hardcoded: this
30+
# assertion is about the TIER, not about any particular triple, and every time a
31+
# target gets promoted the hardcoded spelling stops being planned and the check
32+
# silently becomes a test of something else (riscv64-linux-musl was the second
33+
# one to go that way).
34+
planned=$("$MCPP" toolchain list --no-color 2>/dev/null \
35+
| awk '$NF == "planned" { print $1; exit }')
36+
if [[ -z "$planned" ]]; then
37+
echo "(no planned-tier target registered — step 2 skipped)"
38+
else
39+
if "$MCPP" build --target "$planned" > "$TMP/planned.log" 2>&1; then
40+
echo "FAIL: planned-tier target '$planned' built"; cat "$TMP/planned.log"; exit 1
41+
fi
42+
grep -q "not yet supported" "$TMP/planned.log" || {
43+
echo "FAIL: missing planned-tier error for '$planned'"
44+
cat "$TMP/planned.log"; exit 1; }
3145
fi
32-
grep -q "not yet supported" "$TMP/planned.log" || {
33-
echo "FAIL: missing planned-tier error"; cat "$TMP/planned.log"; exit 1; }
3446

3547
# ── 3. escape hatch: custom triple with an explicit [target.X] section ──────
3648
# (pin the host gcc so resolution succeeds; the point is validation lets an

0 commit comments

Comments
 (0)