File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,22 @@ else ifeq ($(OS),Darwin)
2222 STANC_XATTR := $(shell xattr bin/mac-stanc 2>/dev/null)
2323else ifeq ($(OS),Linux)
2424 OS_TAG := linux
25+ ifeq ($(shell uname -m),mips64)
26+ ARCH_TAG := -mips64el
27+ else ifeq ($(shell uname -m),ppc64le)
28+ ARCH_TAG := -ppc64el
29+ else ifeq ($(shell uname -m),s390x)
30+ ARCH_TAG := -s390x
31+ else ifeq ($(shell uname -m),aarch64)
32+ ARCH_TAG := -arm64
33+ else ifeq ($(shell uname -m),armv7l)
34+ ifeq ($(shell readelf -A /usr/bin/file | grep Tag_ABI_VFP_args),)
35+ ARCH_TAG := -armel
36+ else
37+ ARCH_TAG := -armhf
38+ endif
39+ endif
40+
2541else ifeq ($(OS),missing-submodules)
2642 CMDSTAN_SUBMODULES = 0
2743else
@@ -45,7 +61,7 @@ ifeq ($(OS_TAG),windows)
4561else
4662 bin/stanc$(EXE) :
4763 @mkdir -p $(dir $@)
48- curl -L $(STANC3_TEST_BIN_URL)/bin/$(OS_TAG)-stanc -o bin/stanc$(EXE) --retry $(STANC_DL_RETRY) --retry-delay $(STANC_DL_DELAY)
64+ curl -L $(STANC3_TEST_BIN_URL)/bin/$(OS_TAG)$(ARCH_TAG) -stanc -o bin/stanc$(EXE) --retry $(STANC_DL_RETRY) --retry-delay $(STANC_DL_DELAY)
4965 chmod +x bin/stanc$(EXE)
5066endif
5167
7288# get latest stanc3 - Linux & MacOS
7389 bin/stanc$(EXE) :
7490 @mkdir -p $(dir $@)
75- curl -L https://github.com/stan-dev/stanc3/releases/download/$(STANC3_VERSION)/$(OS_TAG)-stanc -o bin/stanc$(EXE) --retry $(STANC_DL_RETRY) --retry-delay $(STANC_DL_DELAY)
91+ curl -L https://github.com/stan-dev/stanc3/releases/download/$(STANC3_VERSION)/$(OS_TAG)$(ARCH_TAG) -stanc -o bin/stanc$(EXE) --retry $(STANC_DL_RETRY) --retry-delay $(STANC_DL_DELAY)
7692 chmod +x bin/stanc$(EXE)
7793endif
7894endif
You can’t perform that action at this time.
0 commit comments