Skip to content

Commit a2b7dae

Browse files
openkal 0.17.0 and its implementations; compiler-rt-builtins 22.1.8.6 (#569)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 6153a5a commit a2b7dae

11 files changed

Lines changed: 170 additions & 11 deletions

File tree

‎mcpp.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ members = [
223223
"tests/examples/mcr",
224224
"tests/examples/openkal",
225225
"tests/examples/openkal-musl",
226+
"tests/examples/compiler-rt-builtins",
226227
]
227228

228229
# ── The index redirect, hoisted to the workspace root ───────────────────

‎pkgs/l/llvm.compiler-rt-builtins.lua‎

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

5050
xpm = {
5151
linux = {
52+
["22.1.8.6"] = {
53+
url = {
54+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
55+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
56+
},
57+
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
58+
},
5259
["22.1.8.5"] = {
5360
url = {
5461
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",
@@ -79,6 +86,13 @@ package = {
7986
},
8087
},
8188
macosx = {
89+
["22.1.8.6"] = {
90+
url = {
91+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
92+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
93+
},
94+
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
95+
},
8296
["22.1.8.5"] = {
8397
url = {
8498
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",
@@ -109,6 +123,13 @@ package = {
109123
},
110124
},
111125
windows = {
126+
["22.1.8.6"] = {
127+
url = {
128+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
129+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
130+
},
131+
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
132+
},
112133
["22.1.8.5"] = {
113134
url = {
114135
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",

‎pkgs/o/openkal-linux.lua‎

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

2020
xpm = {
2121
linux = {
22+
["0.18.0"] = {
23+
url = {
24+
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
25+
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
26+
},
27+
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
28+
},
2229
["0.17.0"] = {
2330
url = {
2431
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",
@@ -154,6 +161,13 @@ package = {
154161
},
155162
},
156163
macosx = {
164+
["0.18.0"] = {
165+
url = {
166+
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
167+
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
168+
},
169+
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
170+
},
157171
["0.17.0"] = {
158172
url = {
159173
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",
@@ -289,6 +303,13 @@ package = {
289303
},
290304
},
291305
windows = {
306+
["0.18.0"] = {
307+
url = {
308+
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
309+
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
310+
},
311+
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
312+
},
292313
["0.17.0"] = {
293314
url = {
294315
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",

‎pkgs/o/openkal-macos.lua‎

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

2020
xpm = {
2121
linux = {
22+
["0.15.0"] = {
23+
url = {
24+
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
25+
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
26+
},
27+
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
28+
},
2229
["0.14.1"] = {
2330
url = {
2431
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",
@@ -161,6 +168,13 @@ package = {
161168
},
162169
},
163170
macosx = {
171+
["0.15.0"] = {
172+
url = {
173+
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
174+
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
175+
},
176+
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
177+
},
164178
["0.14.1"] = {
165179
url = {
166180
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",
@@ -303,6 +317,13 @@ package = {
303317
},
304318
},
305319
windows = {
320+
["0.15.0"] = {
321+
url = {
322+
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
323+
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
324+
},
325+
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
326+
},
306327
["0.14.1"] = {
307328
url = {
308329
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",

‎pkgs/o/openkal-windows.lua‎

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

2222
xpm = {
2323
linux = {
24+
["0.13.0"] = {
25+
url = {
26+
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
27+
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
28+
},
29+
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
30+
},
2431
["0.12.0"] = {
2532
url = {
2633
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",
@@ -177,6 +184,13 @@ package = {
177184
},
178185
},
179186
macosx = {
187+
["0.13.0"] = {
188+
url = {
189+
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
190+
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
191+
},
192+
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
193+
},
180194
["0.12.0"] = {
181195
url = {
182196
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",
@@ -333,6 +347,13 @@ package = {
333347
},
334348
},
335349
windows = {
350+
["0.13.0"] = {
351+
url = {
352+
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
353+
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
354+
},
355+
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
356+
},
336357
["0.12.0"] = {
337358
url = {
338359
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",

‎pkgs/o/openkal.lua‎

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

2323
xpm = {
2424
linux = {
25+
["0.17.0"] = {
26+
url = {
27+
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
28+
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
29+
},
30+
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
31+
},
2532
["0.16.0"] = {
2633
url = {
2734
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
@@ -129,6 +136,13 @@ package = {
129136
},
130137
},
131138
macosx = {
139+
["0.17.0"] = {
140+
url = {
141+
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
142+
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
143+
},
144+
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
145+
},
132146
["0.16.0"] = {
133147
url = {
134148
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
@@ -236,6 +250,13 @@ package = {
236250
},
237251
},
238252
windows = {
253+
["0.17.0"] = {
254+
url = {
255+
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
256+
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
257+
},
258+
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
259+
},
239260
["0.16.0"] = {
240261
url = {
241262
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# llvm.compiler-rt-builtins test project. The package is the builtins of the
2+
# rows that have no compiler-rt of their own: an ok image (`<arch>-openkal`),
3+
# where openkal-musl's `image-builtins` feature asks for it, and the bare-metal
4+
# rows. No runner here builds those targets, so the member names the package
5+
# under `cfg(os = "openkal")` alone and the candidate gate asks it nothing: the
6+
# package's own CI builds every row it serves. On the runners the member is an
7+
# ordinary program, which keeps the descriptor resolvable by name.
8+
[package]
9+
name = "compiler-rt-builtins-tests"
10+
version = "0.1.0"
11+
12+
[target.'cfg(os = "openkal")'.dependencies.llvm]
13+
compiler-rt-builtins = "22.1.8.6"
14+
15+
[indices]
16+
mcpplibs = { path = "../../.." }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// The member builds on every runner; the package it names is for the ok-image rows.
2+
import std;
3+
4+
int main() {
5+
// 128-bit division, which the builtins supply on the rows this package serves.
6+
const unsigned __int128 n = (static_cast<unsigned __int128>(1) << 100) + 7;
7+
const unsigned __int128 q = n / 3;
8+
std::println("compiler-rt-builtins-tests: {}", static_cast<unsigned long long>(q % 1000003));
9+
return q * 3 + (n % 3) == n ? 0 : 1;
10+
}

‎tests/examples/openkal/mcpp.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ name = "openkal-tests"
1818
version = "0.1.0"
1919

2020
[dependencies.mcpplibs]
21-
openkal = "0.16.0"
21+
openkal = "0.17.0"
2222

2323
[target.'cfg(os = "linux")'.dependencies.mcpplibs]
24-
openkal-linux = "0.17.0"
24+
openkal-linux = "0.18.0"
2525

2626
[target.'cfg(os = "macos")'.dependencies.mcpplibs]
27-
openkal-macos = "0.14.1"
27+
openkal-macos = "0.15.0"
2828

2929
[target.'cfg(windows)'.dependencies.mcpplibs]
30-
openkal-windows = "0.12.0"
30+
openkal-windows = "0.13.0"
3131

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

‎tests/examples/openkal/tests/kal.cpp‎

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// The C surface of openkal through the implementation for this system.
22
//
3-
// One observation per declaration the newest round added, in the terms a
4-
// caller relies on: a context started with a least stack size is told at least
5-
// that size and has the room; a closed directory's enumeration is refused; the
6-
// input position is not an error to ask for. The terminal is not observed here,
3+
// Observations of the declarations recent rounds added, in the terms a caller
4+
// relies on: a context started with a least stack size is told at least that
5+
// size and has the room; a closed directory's enumeration is refused; and
6+
// (0.17) the system is named, this program names itself with the moment it
7+
// started, and a rename that does not replace refuses a name that is taken. The terminal is not observed here,
78
// because a test run has none; the implementations observe it on a terminal
89
// they make.
10+
#include <openkal/env.h>
911
#include <openkal/fs.h>
12+
#include <openkal/process.h>
1013
#include <openkal/stream.h>
1114
#include <openkal/task.h>
1215
#include <openkal/version.h>
@@ -37,7 +40,7 @@ void room(void* p) {
3740
}
3841

3942
int main() {
40-
check(KAL_VERSION_MINOR >= 16u || KAL_VERSION_MAJOR > 0u, "the declarations are openkal 0.16 or later");
43+
check(KAL_VERSION_MINOR >= 17u || KAL_VERSION_MAJOR > 0u, "the declarations are openkal 0.17 or later");
4144
check(kal_version() >= KAL_VERSION, "the implementation is at least as new as the declarations");
4245

4346
probe q{0, 0};
@@ -60,6 +63,30 @@ int main() {
6063
kal_fs_remove(root, "okt.d", 5);
6164
}
6265

66+
{
67+
char system[32];
68+
const kal_intptr n = kal_env_system(system, sizeof system);
69+
check(n > 0, "the system this program runs upon is named");
70+
}
71+
{
72+
kal_process me{};
73+
kal_program_info info{};
74+
info.self_size = sizeof info;
75+
check(kal_process_self(&me) == kal_ok && kal_process_info(me, KAL_PINFO_ALL, &info) == kal_ok
76+
&& info.id != 0 && info.started_ns != 0 && info.ended == 0,
77+
"this program names itself, with the moment it started");
78+
if (me.h) kal_process_close(me);
79+
}
80+
if (root.h && (kal_fs_props(root) & KAL_FS_PROP_RENAME_NO_REPLACE) != 0) {
81+
kal_file f{};
82+
if (kal_fs_open(root, "okt.a", 5, KAL_OPEN_WRITE | KAL_OPEN_CREATE | KAL_OPEN_TRUNCATE, &f) == kal_ok) kal_fs_close_file(f);
83+
if (kal_fs_open(root, "okt.b", 5, KAL_OPEN_WRITE | KAL_OPEN_CREATE | KAL_OPEN_TRUNCATE, &f) == kal_ok) kal_fs_close_file(f);
84+
check(kal_fs_rename_flags(root, "okt.a", 5, root, "okt.b", 5, KAL_RENAME_NO_REPLACE) == kal_err_exists,
85+
"a rename that does not replace refuses a name that is taken");
86+
kal_fs_remove(root, "okt.a", 5);
87+
kal_fs_remove(root, "okt.b", 5);
88+
}
89+
6390
if (failures == 0) kal_stream_write(kal_stdout(), "openkal: held\n", 14);
6491
return failures == 0 ? 0 : 1;
6592
}

0 commit comments

Comments
 (0)