krata: compile for aarch64 (aarch64 guests are not yet supported)

This commit is contained in:
Alex Zenla
2024-03-05 16:37:36 -08:00
parent f8e2f50c60
commit 0e27b8f228
10 changed files with 62 additions and 16 deletions

30
scripts/detect-rust-target.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
set -e
if [ -z "${RUST_LIBC}" ]
then
RUST_LIBC="gnu"
fi
if [ -z "${RUST_TARGET}" ]
then
HOST_ARCH="$(uname -m)"
if [ "${HOST_ARCH}" = "x86_64" ]
then
RUST_TARGET="x86_64-unknown-linux-${RUST_LIBC}"
fi
if [ "${HOST_ARCH}" = "aarch64" ]
then
RUST_TARGET="aarch64-unknown-linux-${RUST_LIBC}"
fi
fi
if [ -z "${RUST_TARGET}" ]
then
echo "ERROR: Unable to determine RUST_TARGET, your architecture may not be supported by krata." > /dev/stderr
exit 1
fi
echo "${RUST_TARGET}"