Skip to content

Add or1k-linux support (via CBE)#25623

Merged
alexrp merged 11 commits intoziglang:masterfrom
alexrp:or1k
Oct 19, 2025
Merged

Add or1k-linux support (via CBE)#25623
alexrp merged 11 commits intoziglang:masterfrom
alexrp:or1k

Conversation

@alexrp
Copy link
Copy Markdown
Member

@alexrp alexrp commented Oct 18, 2025

Just a little weekend project to show how, using the CBE, support can be added for a target that we don't yet have a backend for:

❯ cat main.zig
const std = @import("std");
pub fn main() void {
    std.debug.print("hello world\n", .{});
}
❯ zig build-lib $ZIG/ziglang/zig/lib/compiler_rt.zig -target or1k-linux-gnu -lc -ofmt=c
❯ zig build-exe main.zig -target or1k-linux-gnu -lc -ofmt=c
❯ or1k-linux-gnu-gcc compiler_rt.c -I $ZIG/ziglang/zig/lib -std=gnu99 -c
❯ or1k-linux-gnu-gcc main.c -I $ZIG/ziglang/zig/lib -std=gnu99 compiler_rt.o
❯ qemu-or1k -L $LIBCS/or1k-linux-gnu-hard ./a.out
hello world

@alexrp alexrp mentioned this pull request Oct 18, 2025
12 tasks
@alexrp alexrp merged commit 38caa49 into ziglang:master Oct 19, 2025
7 of 9 checks passed
@alexrp alexrp deleted the or1k branch October 19, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant