Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 31 additions & 10 deletions pkgs/r/riscv-virt-rt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
-- link against nothing. Pointing at the manifest moves the root inside the
-- wrap layer, where both the manifest and the program live.
--
-- ⚠️ `deps` is at the xpm PLATFORM level, not in the mcpp segment. The two
-- entries are xim packages (an emulator and a target sysroot), not mcpp
-- packages, so they travel on xim's install-time dependency edge. This matters
-- more than it looks: mcpp materializes `[xlings] deps` for the ROOT project
-- only, so a consumer that just runs `mcpp add riscv-virt-rt` would otherwise
-- get the board package with neither a libc nor an emulator, and find out at
-- build.mcpp time.
-- ⚠️ `deps` names the EMULATOR and nothing else. The target's C library is not
-- here because it is not this package's: mcpp resolves it from the target's
-- own row, the way it resolves the compiler. What is left is the one xim
-- package that really is a board fact — how to run an image — and it is at the
-- xpm PLATFORM level because mcpp materializes `[xlings] deps` for the ROOT
-- project only, so a consumer running `mcpp add riscv-virt-rt` would otherwise
-- get a board package with no way to start it.
package = {
spec = "1",
namespace = "mcpplibs",
Expand All @@ -30,7 +30,7 @@ package = {
-- published is a version someone may have pinned.
xpm = {
linux = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -45,9 +45,16 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
macosx = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -62,9 +69,16 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
windows = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -79,6 +93,13 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
},

Expand Down
56 changes: 56 additions & 0 deletions pkgs/s/std-freestanding.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
-- std-freestanding — the freestanding subset of the C++ standard library.
--
-- Form A because the package ships a `build.mcpp`, which mcpp looks for at the
-- package ROOT: Form B would leave it one level down inside the tarball's wrap
-- directory, unfound, and the package would resolve and compile and then link
-- against nothing.
--
-- ⚠️ NO `deps`, and that is the design. This package needs libc++'s headers
-- and the target's C headers, and it gets both by ASKING mcpp
-- (`mcpp::toolchain_dir()`, and the target's libc which mcpp already puts on
-- the compile line) rather than by declaring who provides them. Declaring
-- pinned it to one standard-library implementation, one C library, one
-- architecture and one version of each — none of which it has any business
-- knowing about.
package = {
spec = "1",
namespace = "mcpplibs",
name = "std-freestanding",
description = "The freestanding subset of the C++ standard library as one module — import mcpplibs.std.freestanding",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/std-freestanding",
type = "package",

xpm = {
linux = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
macosx = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
windows = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
},

-- The package's own manifest, inside the tarball's wrap directory.
mcpp = "*/mcpp.toml",
}
Loading