Support binary prefix for aarch64 on aarch64

This commit is contained in:
Jeremy Soller 2025-10-21 12:27:40 -06:00
parent 41ca0bea4c
commit 9db52437c6
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
2 changed files with 12 additions and 3 deletions

View File

@ -45,9 +45,18 @@ export NPROC=nproc
export REDOX_MAKE=make
HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
# x86_64 linux hosts have all toolchains
ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
$(info The binary prefix is only built for x86_64 Linux hosts)
PREFIX_BINARY=0
ifeq ($(ARCH),aarch64)
# aarch64 linux hosts have aarch64 toolchain
ifneq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
$(info The $(ARCH) binary prefix is only built for x86_64 and aarch64 Linux hosts)
PREFIX_BINARY=0
endif
else
$(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts)
PREFIX_BINARY=0
endif
endif
ifeq ($(SCCACHE_BUILD),1)

View File

@ -128,7 +128,7 @@ ifeq ($(PREFIX_BINARY),1)
$(PREFIX)/rust-install.tar.gz:
mkdir -p "$(@D)"
#TODO: figure out why rust-install.tar.gz is missing /lib/rustlib/$(HOST_TARGET)/lib
wget -O $@.partial "https://static.redox-os.org/toolchain/$(TARGET)/relibc-install.tar.gz"
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz"
mv $@.partial $@
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz