From 767eb756629b33b233a8e312d9e71cbe5f6067d3 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Wed, 4 Feb 2026 18:44:03 +0100 Subject: [PATCH] gyro_fft: fix clang build error on Linux arm64 Extend the -Wno-asm-operand-widths workaround to include Linux aarch64 in addition to Apple Silicon. CMSIS DSP contains ARM Cortex-M specific assembly that clang (but not gcc) warns about on 64-bit ARM platforms. The assembly code is unused on POSIX builds - only the C fallback implementations are executed in SITL. This fixes clang-tidy CI failing on arm64 runners. Signed-off-by: Ramon Roche --- src/modules/gyro_fft/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/gyro_fft/CMakeLists.txt b/src/modules/gyro_fft/CMakeLists.txt index 9bf6832ed4..b342ef250f 100644 --- a/src/modules/gyro_fft/CMakeLists.txt +++ b/src/modules/gyro_fft/CMakeLists.txt @@ -38,8 +38,10 @@ if(${PX4_PLATFORM} MATCHES "NuttX") add_compile_options(-DARM_MATH_DSP) endif() -# Disable 32-bit assembly warnings on apple silicon. Triggered by unused code only. -if(${PX4_PLATFORM} MATCHES "posix" AND APPLE AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm64") +# Disable 32-bit assembly warnings on arm64 platforms (Apple Silicon, Linux aarch64). +# CMSIS DSP contains ARM Cortex-M assembly that triggers clang warnings on 64-bit ARM. +# This code is unused on POSIX platforms - only the C fallback implementations run. +if(${PX4_PLATFORM} MATCHES "posix" AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64") add_compile_options(-Wno-asm-operand-widths) endif()