From 5bf5bc69ddf8a5e8899212ef4b2c03bf46c9886b Mon Sep 17 00:00:00 2001 From: Jamie Pryde Date: Fri, 1 May 2026 10:45:42 +0100 Subject: [PATCH] cmake: Fix ISA-L build on arm A typo in CFLAGS means we're passing an empty string to configure_cmd. We are then overwriting the build environment CFLAGS with our empty string CFLAGS, which can result in build failures in certain environments, as seen in the tracker. This fix gets any build environment CFLAGS and appends the other flags we want to use when building ISA-L 2.32.0 Fixes: https://tracker.ceph.com/issues/76389 Signed-off-by: Jamie Pryde --- cmake/modules/BuildISAL.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/BuildISAL.cmake b/cmake/modules/BuildISAL.cmake index 5d9f48f77394..a0c0245013bc 100644 --- a/cmake/modules/BuildISAL.cmake +++ b/cmake/modules/BuildISAL.cmake @@ -21,15 +21,15 @@ function(build_isal) if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND HAVE_ARMV8_SIMD) list(APPEND arm_cflags "-no-integrated-as") endif() - # isa-l 2.32.0 requires SVE assembly support + # isa-l 2.32.0 includes SVE and SVE2-optimized assembly for better performance on + # compatible ARM CPUs if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") list(APPEND arm_cflags "-Wa,-march=armv8-a+sve") endif() if(arm_cflags) string(REPLACE ";" " " arm_cflags_str "${arm_cflags}") - list(APPEND configure_cmd "CFLAGS=${arm_cflags_string}") + list(APPEND configure_cmd "CFLAGS=$ENV{CFLAGS} -fPIC ${arm_cflags_str}") endif() - include(ExternalProject) ExternalProject_Add(isal_ext -- 2.47.3