aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz <some.email@example.com>2024-10-05 12:09:39 +0100
committerMoritz <some.email@example.com>2024-10-05 12:09:39 +0100
commit249242687c7d12cefd0f70bb6f62a8cb722ed323 (patch)
treeb0cb27723dac19acf686739ed916b6450af25c6f
parent60eac68be7f91a0036095b65bd2b55421eff2267 (diff)
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`.
-rwxr-xr-xbuild_odin.sh2
1 files changed, 1 insertions, 1 deletions
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