Tier 1 Support for riscv64-linux
Once all these items are complete, we can say that Zig has Tier 1 support for 64-bit RISC-V Linux.
- [x] make sure we can build-exe with
-target riscv64-linux-gnu - [x] make sure we can build-exe with
-target riscv64-linux-musl - [x] ability to build libc for riscv64-linux-gnu (#3340)
- [x] ability to build libc for riscv64-linux-musl
- [ ] make sure stack traces / debug info works & add test coverage
- [x] add the target to the test matrix
- [x] get the full test suite passing
- [ ] figure out a risc-v linux continuous integration testing service and hook it up to zig's CI testing.
- [x] hook up to update download page with risc-v tarballs
zig build-exe hello.c -lc -target riscv64-linux-musl with version 0.10.0-dev.3660+4a98385b0 works.
Looks like traces work, only needs to be added to the test coverage according to the task.
const std = @import("std");
pub fn a() !void {
try b();
}
pub fn b() !void {
try c();
}
pub fn c() !void {
return error.@"I'm a cat";
}
pub fn main() !void {
try a();
}
error: I'm a cat
/home/ross/ExpidusOS/zig/main.zig:12:5: 0x100b5b7 in c (main)
return error.@"I'm a cat";
^
/home/ross/ExpidusOS/zig/main.zig:8:5: 0x100b6d9 in b (main)
try c();
^
/home/ross/ExpidusOS/zig/main.zig:4:5: 0x100b71b in a (main)
try b();
^
/home/ross/ExpidusOS/zig/main.zig:16:5: 0x100b75d in main (main)
try a();
^
ability to build libc for riscv64-linux-musl
This can be crossed off now:
❯ cat main.zig
const std = @import("std");
pub fn main() !void {
std.debug.print("Hello, World!\n", .{});
}
❯ ../zig/build/debug/bin/zig build-exe main.zig -target riscv64-linux
❯ ../zig/build/debug/bin/zig build-exe main.zig -target riscv64-linux-musl -lc
figure out a risc-v linux continuous integration testing service and hook it up to zig's CI testing.
Scaleway's pricing looks quite reasonable: https://labs.scaleway.com/en/em-rv1
Issues to solve:
These are all done.
ability to build libc for riscv64-linux-gnu
This can also be crossed off as of #20909.
figure out a risc-v linux continuous integration testing service and hook it up to zig's CI testing.
@andrewrk @alexrp Do you need someone to donate some RISC-V physical machines to you?
We are very interested in this and would like to provide some help. Can you provide more detailed requirements?
@Glavo hey, sorry for the super late response. Probably the most important requirement is that we need physical control over the machines that we run CI on.