Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tier 1 Support for riscv64-linux #4456

Open
7 of 9 tasks
andrewrk opened this issue Feb 14, 2020 · 6 comments
Open
7 of 9 tasks

Tier 1 Support for riscv64-linux #4456

andrewrk opened this issue Feb 14, 2020 · 6 comments
Labels
arch-riscv 32-bit and 64-bit RISC-V contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-linux tier system Issues that track the support tier for a platform.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Feb 14, 2020

Once all these items are complete, we can say that Zig has Tier 1 support for 64-bit RISC-V Linux.

  • make sure we can build-exe with -target riscv64-linux-gnu
  • make sure we can build-exe with -target riscv64-linux-musl
  • ability to build libc for riscv64-linux-gnu (unable to build glibc for target riscv64-linux-gnu #3340)
  • ability to build libc for riscv64-linux-musl
  • make sure stack traces / debug info works & add test coverage
  • add the target to the test matrix
  • 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.
  • hook up to update download page with risc-v tarballs
@Ivan-Velickovic
Copy link
Contributor

zig build-exe hello.c -lc -target riscv64-linux-musl with version 0.10.0-dev.3660+4a98385b0 works.

@RossComputerGuy
Copy link
Contributor

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();
    ^

@alexrp
Copy link
Member

alexrp commented Aug 1, 2024

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.

@alexrp
Copy link
Member

alexrp commented Aug 13, 2024

ability to build libc for riscv64-linux-gnu

This can also be crossed off as of #20909.

@alexrp
Copy link
Member

alexrp commented Sep 25, 2024

This can be crossed off as of the LLVM 19 upgrade.

@alexrp alexrp added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. labels Oct 9, 2024
@alexrp alexrp added the tier system Issues that track the support tier for a platform. label Nov 19, 2024
@Glavo
Copy link

Glavo commented Nov 25, 2024

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?

@alexrp alexrp modified the milestones: 0.16.0, 0.15.0 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-riscv 32-bit and 64-bit RISC-V contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-linux tier system Issues that track the support tier for a platform.
Projects
None yet
Development

No branches or pull requests

5 participants