Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

### Added

- **openkal-musl 0.23.0、openkal-llvm-runtime 0.16.10。** openkal-musl 的文件 `mmap`、`munmap`、`msync` 经
`openkal.map`(偏移按 `KAL_MAP_ALIGNMENT` 向下对齐,区域止于文件末尾);openkal-llvm-runtime 随之移动。测试成员
`openkal-musl` 观察映射的文件,`openkal` 移到 0.16.10。GLOBAL 为 GitHub 标签归档,CN 为 GitCode `mcpp-res` 镜像,
sha256 两处一致。
- **openkal-ld、openkal-run、openkal-tools、openkal-bind 0.1.5。** okrun 以 `openkal.map`(私有、可写)映射它运行的映像
或 okb,而不是整体读入内存,映像结束时释放;映像绑定 `openkal.map` 的三个函数。四个成员钉 openkal 0.18.0、
openkal-linux 0.19.0、openkal-macos 0.16.0、openkal-windows 0.14.0。测试成员 `openkal-tools`、`openkal-bind`
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-llvm-runtime.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ package = {

xpm = {
linux = {
["0.16.10"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
},
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
},
["0.16.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",
Expand Down Expand Up @@ -371,6 +378,13 @@ package = {
},
},
macosx = {
["0.16.10"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
},
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
},
["0.16.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",
Expand Down Expand Up @@ -667,6 +681,13 @@ package = {
},
},
windows = {
["0.16.10"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
},
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
},
["0.16.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-musl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ package = {

xpm = {
linux = {
["0.23.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
},
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
},
["0.22.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",
Expand Down Expand Up @@ -385,6 +392,13 @@ package = {
},
},
macosx = {
["0.23.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
},
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
},
["0.22.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",
Expand Down Expand Up @@ -695,6 +709,13 @@ package = {
},
},
windows = {
["0.23.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
},
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
},
["0.22.9"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/openkal-musl/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "openkal-musl-tests"
version = "0.1.0"

[target.'cfg(os = "linux")'.dependencies.mcpplibs]
openkal-musl = "0.22.9"
openkal-musl = "0.23.0"

[target.'cfg(os = "linux")'.build]
cxxflags = ["-DHAVE_OPENKAL_MUSL=1"]
Expand Down
15 changes: 14 additions & 1 deletion tests/examples/openkal-musl/tests/reports.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* The reporters' programs, above openkal-musl. Elsewhere this compiles to a
* main() that reports nothing, because the member names the port for Linux
* alone. */
* alone. And (0.23) a file mapped with mmap. */
#ifndef HAVE_OPENKAL_MUSL
int main(void) { return 0; }
#else
Expand All @@ -10,6 +10,7 @@ int main(void) { return 0; }
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>

Expand Down Expand Up @@ -45,6 +46,18 @@ int main(void) {
static char region[1 << 20];
pthread_attr_setstack(&attr, region, sizeof region);
check(pthread_create(&t, &attr, body, &depth) == EINVAL, "a stack the caller supplies is refused");
/* 0.23: mmap of a file is openkal.map's; the bytes after the end in the last page are zero. */
int fd = open("okm.map", O_RDWR | O_CREAT | O_TRUNC, 0644);
if (fd >= 0 && write(fd, "mapped", 6) == 6) {
const char* p = (const char*)mmap(NULL, 6, PROT_READ, MAP_PRIVATE, fd, 0);
check(p != MAP_FAILED, "a file is mapped");
if (p != MAP_FAILED) {
check(p[0] == 'm' && p[5] == 'd' && p[6] == 0, "the region holds the file's bytes and zero after its end");
check(munmap((void*)p, 6) == 0, "the region is released");
}
}
if (fd >= 0) close(fd);
unlink("okm.map");
return failures != 0;
}
#endif
2 changes: 1 addition & 1 deletion tests/examples/openkal/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ openkal-macos = "0.16.0"
openkal-windows = "0.14.0"

[target.'cfg(all(os = "linux", env = "musl"))'.dependencies.mcpplibs]
openkal-llvm-runtime = "0.16.9"
openkal-llvm-runtime = "0.16.10"

[target.'cfg(arch = "wasm32")'.dependencies.mcpplibs]
openkal-emscripten = "0.6.0"
Expand Down
Loading