perf(build): update ARM optimization flags for better compatibility

Replace -mcpu with -mtune in compiler flags to improve binary compatibility
while maintaining performance for Cortex-A7 targets
This commit is contained in:
Alex P 2025-09-04 08:25:16 +00:00
parent b63404c26b
commit 6f15fdf965
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ ALSA_VERSION ?= 1.2.14
OPUS_VERSION ?= 1.5.2
# Optimization flags for ARM Cortex-A7 with NEON
OPTIM_CFLAGS := -O3 -mcpu=cortex-a7 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ffast-math -funroll-loops
OPTIM_CFLAGS := -O3 -mfpu=neon -mtune=cortex-a7 -mfloat-abi=hard -ftree-vectorize -ffast-math -funroll-loops
PROMETHEUS_TAG := github.com/prometheus/common/version
KVM_PKG_NAME := github.com/jetkvm/kvm

View File

@ -24,7 +24,7 @@ cd "$AUDIO_LIBS_DIR"
[ -d opus-${OPUS_VERSION} ] || tar xf opus-${OPUS_VERSION}.tar.gz
# Optimization flags for ARM Cortex-A7 with NEON
OPTIM_CFLAGS="-O3 -mcpu=cortex-a7 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ffast-math -funroll-loops"
OPTIM_CFLAGS="-O3 -mfpu=neon -mtune=cortex-a7 -mfloat-abi=hard -ftree-vectorize -ffast-math -funroll-loops"
export CC="${CROSS_PREFIX}-gcc"
export CFLAGS="$OPTIM_CFLAGS"