فهرست منبع

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`.
Moritz 10 ماه پیش
والد
کامیت
249242687c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      build_odin.sh

+ 1 - 1
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