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

add loong64 support #8

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ GOHOSTOS ?= $(shell go env GOHOSTOS)

# Install protoc and friends under tools/bin.
PROTOC_VERSION=21.5
PROTOC_URL=https://github.com/protocolbuffers/protobuf/releases/download/v
ifeq ($(GOHOSTARCH),arm64)
PROTOC_ARCH=aarch_64
else ifeq ($(GOHOSTARCH),amd64)
PROTOC_ARCH=x86_64
else ifeq ($(GOHOSTARCH),loong64)
PROTOC_ARCH=loong64
PROTOC_URL=https://github.com/Loongson-Cloud-Community/protobuf/releases/download/v
else
PROTOC_ARCH=$(GOHOSTARCH)
endif
Expand All @@ -75,7 +79,7 @@ endif
PROTOC_ZIP=protoc-$(PROTOC_VERSION)-$(PROTOC_OS_ARCH).zip
tools/$(PROTOC_ZIP):
mkdir -p $(@D)
curl -sfL https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/$(PROTOC_ZIP) -o $@
curl -sfL $(PROTOC_URL)$(PROTOC_VERSION)/$(PROTOC_ZIP) -o $@

%/bin/protoc$(EXE) %/include %/readme.txt: %/$(PROTOC_ZIP)
cd $* && unzip -q -o -DD $(<F)
Expand Down