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 <jamiepry@uk.ibm.com>
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