Skip to content

Commit 83ca607

Browse files
committed
fix: riscv-virt-rt 0.4.1 —— 0.4.0 的零 libc 模板生成出来跑不起来
脚手架会把模板自己的包注入为依赖(好让模板不与库脱节),而本包的模块 #include <stdio.h> ⇒ 在没有 C 库的目标上,那个从未被请求的依赖在工程本身之前就编不过。 0.4.1 声明 [template.inject] self = false(需 mcpp 2026.8.20.2+),并把「没有 C 库」 从错误改为不贡献,同时**照常发模拟器** —— 哪个模拟器能启动这台机器与哪份 libc 无关。 0.4.0 保留:它的默认模板不受影响。 ⚠️ 这是本轮唯一一次发布之后才发现的缺陷,发现方式是用发布后的包从零走一遍新用户流程。
1 parent da21eb7 commit 83ca607

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

pkgs/r/riscv-virt-rt.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
-- xpm PLATFORM level because mcpp materializes `[xlings] deps` for the ROOT
1717
-- project only, so a consumer running `mcpp add riscv-virt-rt` would otherwise
1818
-- get a board package with no way to start it.
19+
-- ⚠️ 0.4.0's `nolibc` template generates a project that does not run. The
20+
-- scaffolder injects the template's own package as a dependency, and this
21+
-- package's module includes <stdio.h> — so on a target with no C library the
22+
-- injected dependency fails to compile before the generated project is
23+
-- reached. 0.4.1 declines the injection (`[template.inject] self = false`,
24+
-- mcpp 2026.8.20.2+) and stops treating an absent C library as an error, while
25+
-- still supplying the emulator. 0.4.0 stays listed; its default template is
26+
-- unaffected.
1927
package = {
2028
spec = "1",
2129
namespace = "mcpplibs",
@@ -59,6 +67,13 @@ package = {
5967
},
6068
sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e",
6169
},
70+
["0.4.1"] = {
71+
url = {
72+
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz",
73+
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz",
74+
},
75+
sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46",
76+
},
6277
},
6378
macosx = {
6479
deps = { "xim:qemu-riscv@9.2.4-1" },
@@ -90,6 +105,13 @@ package = {
90105
},
91106
sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e",
92107
},
108+
["0.4.1"] = {
109+
url = {
110+
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz",
111+
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz",
112+
},
113+
sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46",
114+
},
93115
},
94116
windows = {
95117
deps = { "xim:qemu-riscv@9.2.4-1" },
@@ -121,6 +143,13 @@ package = {
121143
},
122144
sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e",
123145
},
146+
["0.4.1"] = {
147+
url = {
148+
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz",
149+
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz",
150+
},
151+
sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46",
152+
},
124153
},
125154
},
126155

0 commit comments

Comments
 (0)