From 249242687c7d12cefd0f70bb6f62a8cb722ed323 Mon Sep 17 00:00:00 2001 From: Moritz Date: Sat, 5 Oct 2024 12:09:39 +0100 Subject: [PATCH] Fix build for linux aarch64 architectures Build failed to compile on Raspberry Pi 4, with clang: error: the clang compiler does not support '-march=native' The build script checks $OS_ARCH for `arm64` to distinghuish between ARM and X64 architecture. However on Raspberry Pi, the `uname -m` command reports `aarch64` rather than `arm64`. This change updates the EXTRAFLAGS of the `release-native` target to check for both - `arm64` and `aarch64`. --- build_odin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_odin.sh b/build_odin.sh index f283dc441..c06004ea8 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -130,7 +130,7 @@ build_odin() { EXTRAFLAGS="-O3" ;; release-native) - if [ "$OS_ARCH" = "arm64" ]; then + if [ "$OS_ARCH" = "arm64" ] || [ "$OS_ARCH" = "aarch64" ]; then # Use preferred flag for Arm (ie arm64 / aarch64 / etc) EXTRAFLAGS="-O3 -mcpu=native" else