From: Jamie Pryde Date: Fri, 1 May 2026 09:45:42 +0000 (+0100) Subject: cmake: Fix ISA-L build on arm X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5bf5bc69ddf8a5e8899212ef4b2c03bf46c9886b;p=ceph.git 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 --- 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