Skip to content

Commit 48dee78

Browse files
openkal-musl 0.23.0, openkal-llvm-runtime 0.16.10 (#637)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 5169dbc commit 48dee78

6 files changed

Lines changed: 62 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
### Added
1111

12+
- **openkal-musl 0.23.0、openkal-llvm-runtime 0.16.10。** openkal-musl 的文件 `mmap`、`munmap`、`msync` 经
13+
`openkal.map`(偏移按 `KAL_MAP_ALIGNMENT` 向下对齐,区域止于文件末尾);openkal-llvm-runtime 随之移动。测试成员
14+
`openkal-musl` 观察映射的文件,`openkal` 移到 0.16.10。GLOBAL 为 GitHub 标签归档,CN 为 GitCode `mcpp-res` 镜像,
15+
sha256 两处一致。
1216
- **openkal-ld、openkal-run、openkal-tools、openkal-bind 0.1.5。** okrun 以 `openkal.map`(私有、可写)映射它运行的映像
1317
或 okb,而不是整体读入内存,映像结束时释放;映像绑定 `openkal.map` 的三个函数。四个成员钉 openkal 0.18.0、
1418
openkal-linux 0.19.0、openkal-macos 0.16.0、openkal-windows 0.14.0。测试成员 `openkal-tools`、`openkal-bind`

‎pkgs/o/openkal-llvm-runtime.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ package = {
7575

7676
xpm = {
7777
linux = {
78+
["0.16.10"] = {
79+
url = {
80+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
81+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
82+
},
83+
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
84+
},
7885
["0.16.9"] = {
7986
url = {
8087
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",
@@ -371,6 +378,13 @@ package = {
371378
},
372379
},
373380
macosx = {
381+
["0.16.10"] = {
382+
url = {
383+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
384+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
385+
},
386+
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
387+
},
374388
["0.16.9"] = {
375389
url = {
376390
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",
@@ -667,6 +681,13 @@ package = {
667681
},
668682
},
669683
windows = {
684+
["0.16.10"] = {
685+
url = {
686+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.10.tar.gz",
687+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.10/openkal-llvm-runtime-0.16.10.tar.gz",
688+
},
689+
sha256 = "6f23060d3956c19986ee18a72034017b3f918dbe8c5fe4011b8fad8a3a7b00ba",
690+
},
670691
["0.16.9"] = {
671692
url = {
672693
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.9.tar.gz",

‎pkgs/o/openkal-musl.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ package = {
7575

7676
xpm = {
7777
linux = {
78+
["0.23.0"] = {
79+
url = {
80+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
81+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
82+
},
83+
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
84+
},
7885
["0.22.9"] = {
7986
url = {
8087
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",
@@ -385,6 +392,13 @@ package = {
385392
},
386393
},
387394
macosx = {
395+
["0.23.0"] = {
396+
url = {
397+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
398+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
399+
},
400+
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
401+
},
388402
["0.22.9"] = {
389403
url = {
390404
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",
@@ -695,6 +709,13 @@ package = {
695709
},
696710
},
697711
windows = {
712+
["0.23.0"] = {
713+
url = {
714+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.23.0.tar.gz",
715+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.23.0/openkal-musl-0.23.0.tar.gz",
716+
},
717+
sha256 = "d2238aef42b4155d23aa87431d3c344fafcba78446473499bb9b1472f9d31a87",
718+
},
698719
["0.22.9"] = {
699720
url = {
700721
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.9.tar.gz",

‎tests/examples/openkal-musl/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "openkal-musl-tests"
88
version = "0.1.0"
99

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

1313
[target.'cfg(os = "linux")'.build]
1414
cxxflags = ["-DHAVE_OPENKAL_MUSL=1"]

‎tests/examples/openkal-musl/tests/reports.cpp‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* The reporters' programs, above openkal-musl. Elsewhere this compiles to a
22
* main() that reports nothing, because the member names the port for Linux
3-
* alone. */
3+
* alone. And (0.23) a file mapped with mmap. */
44
#ifndef HAVE_OPENKAL_MUSL
55
int main(void) { return 0; }
66
#else
@@ -10,6 +10,7 @@ int main(void) { return 0; }
1010
#include <fcntl.h>
1111
#include <pthread.h>
1212
#include <stdio.h>
13+
#include <sys/mman.h>
1314
#include <sys/stat.h>
1415
#include <unistd.h>
1516

@@ -45,6 +46,18 @@ int main(void) {
4546
static char region[1 << 20];
4647
pthread_attr_setstack(&attr, region, sizeof region);
4748
check(pthread_create(&t, &attr, body, &depth) == EINVAL, "a stack the caller supplies is refused");
49+
/* 0.23: mmap of a file is openkal.map's; the bytes after the end in the last page are zero. */
50+
int fd = open("okm.map", O_RDWR | O_CREAT | O_TRUNC, 0644);
51+
if (fd >= 0 && write(fd, "mapped", 6) == 6) {
52+
const char* p = (const char*)mmap(NULL, 6, PROT_READ, MAP_PRIVATE, fd, 0);
53+
check(p != MAP_FAILED, "a file is mapped");
54+
if (p != MAP_FAILED) {
55+
check(p[0] == 'm' && p[5] == 'd' && p[6] == 0, "the region holds the file's bytes and zero after its end");
56+
check(munmap((void*)p, 6) == 0, "the region is released");
57+
}
58+
}
59+
if (fd >= 0) close(fd);
60+
unlink("okm.map");
4861
return failures != 0;
4962
}
5063
#endif

‎tests/examples/openkal/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ openkal-macos = "0.16.0"
3030
openkal-windows = "0.14.0"
3131

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

3535
[target.'cfg(arch = "wasm32")'.dependencies.mcpplibs]
3636
openkal-emscripten = "0.6.0"

0 commit comments

Comments
 (0)