Skip to content

Commit

Permalink
Merge pull request #8 from yzewei/loong64-support-master
Browse files Browse the repository at this point in the history
add loong64 support
  • Loading branch information
thallgren authored Oct 24, 2023
2 parents 3d4f686 + 49daab6 commit 9ea3c0f
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 9ea3c0f

Please sign in to comment.