From 6d927cb052593e1ccf364dc9329673b005a7a73b Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Sun, 16 Feb 2025 13:18:18 +0000 Subject: [PATCH] cmake/modules/BuildQATzip: Disable errors qatzip/configure.ac enables -Werror. However, newer compilers (e.g clang 16) will not compile with the existing warnings identified. The fixes for the warnings are not merged yet [1] in the submodule. Until then, in order to allow for compiler upgrade - we should disable the problematic errors. [1] https://github.com/intel/QATzip/pull/119 Signed-off-by: Matan Breizman --- cmake/modules/BuildQATzip.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/modules/BuildQATzip.cmake b/cmake/modules/BuildQATzip.cmake index 91cb43c822d..70fafb8f548 100644 --- a/cmake/modules/BuildQATzip.cmake +++ b/cmake/modules/BuildQATzip.cmake @@ -11,16 +11,21 @@ function(build_qatzip) set(configure_cmd env CC=${CMAKE_C_COMPILER} ./configure --prefix=${QATzip_INSTALL_DIR}) # build a static library with -fPIC that we can link into crypto/compressor plugins list(APPEND configure_cmd --with-pic --enable-static --disable-shared) + + set(CFLAGS "-Wno-error=strict-prototypes -Wno-error=unused-but-set-variable") if(QATDRV_INCLUDE_DIR) list(APPEND configure_cmd --with-ICP_ROOT=${QATDRV_INCLUDE_DIR}) endif() if(QAT_INCLUDE_DIR) - list(APPEND configure_cmd CFLAGS=-I${QAT_INCLUDE_DIR}) + list(APPEND CFLAGS -I${QAT_INCLUDE_DIR}) endif() if(QAT_LIBRARY_DIR) list(APPEND configure_cmd LDFLAGS=-L${QAT_LIBRARY_DIR}) endif() + list(JOIN CFLAGS " " CFLAGS) + list(APPEND configure_cmd CFLAGS=${CFLAGS}) + # clear the DESTDIR environment variable from debian/rules, # because it messes with the internal install paths of arrow's bundled deps set(NO_DESTDIR_COMMAND ${CMAKE_COMMAND} -E env --unset=DESTDIR) -- 2.39.5