From 2bf98ebff08d42ec01e46d553a3231b1f18b6b29 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 26 Oct 2026 05:24:11 +0900 Subject: cmd/dist: enable ppc64le cross-compilation The ppc64le target is currently cross-only due to the lack of test constants. A future change may downgrade riscv64 to the same status. Signed-off-by: Ophestra --- cmd/dist/main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/dist/main.go b/cmd/dist/main.go index df586bbf..b147ade5 100644 --- a/cmd/dist/main.go +++ b/cmd/dist/main.go @@ -47,15 +47,17 @@ func mustRun(ctx context.Context, env []string, name string, arg ...string) { } } -// mustLinuxArch returns the architecture name used by linux corresponding to arch. -func mustLinuxArch(arch string) string { +// mustLLVMArch returns the LLVM target-triple-specific name corresponding to arch. +func mustLLVMArch(arch string) string { switch arch { case "amd64": return "x86_64" case "arm64": return "aarch64" + case "ppc64le": + return "powerpc64le" case "riscv64": - return "riscv64" + return arch default: log.Fatalf("unsupported target %s", arch) @@ -81,8 +83,8 @@ func main() { prefix := getenv("PREFIX", "/usr/local") destdir := getenv("DESTDIR", "dist") - linuxArch := mustLinuxArch(arch) - target := linuxArch + "-rosa-linux-musl" + llvmArch := mustLLVMArch(arch) + target := llvmArch + "-rosa-linux-musl" if verbose { log.Println() -- cgit v1.3.1