Skip to content

Commit 775dd01

Browse files
authored
build: add LoongArch build instructions (#6612)
Signed-off-by: jiefenghuang <jiefeng@juicedata.io>
1 parent 92f8dbf commit 775dd01

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ juicefs.gluster.cover: Makefile cmd/*.go pkg/*/*.go
5656
juicefs.all: Makefile cmd/*.go pkg/*/*.go
5757
go build -tags ceph,fdb,gluster -gcflags="$(GCFLAGS)" -ldflags="$(LDFLAGS)" -o juicefs.all .
5858

59+
# This is cross-compiling LoongArch in a Linux environment on x86_64 (amd64) or aarch64 (arm64) architecture.
60+
# 1. Install LoongArch64 cross-compile toolchain from https://github.com/loong64/cross-tools
61+
# 2. Set CC to your toolchain path.
62+
# 3. Run `STATIC=1 make juicefs.loongarch` to build the LoongArch binary.
63+
juicefs.loongarch: Makefile cmd/*.go pkg/*/*.go go.*
64+
CC=bin/loongarch64-unknown-linux-musl-cc CGO_ENABLED=1 GOARCH=loong64 go build -gcflags="$(GCFLAGS)" -ldflags="$(LDFLAGS)" -o juicefs .
65+
5966
# This is the script for compiling the Linux version on the MacOS platform.
6067
# Please execute the `brew install FiloSottile/musl-cross/musl-cross` command before using it.
6168
juicefs.linux:

0 commit comments

Comments
 (0)