From 10ded5225bb5f8981286b820acac234bf69abc97 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 5 Mar 2022 12:49:57 +0800 Subject: [PATCH] cmake: pass RTE_DEVEL_BUILD=n when building dpdk ceph is still using the Makefile based building system for building DPDK. and DPDK enables -Werror if RTE_DEVEL_BUILD is 'y' which is enabled by default when the dpdk is built from a git repo. but newer GCC is more picky than the older versions, to prevent the possible FTBFS when we switch to newer GCC for building old branches whose dpdk submodule might be include the changes addressing those warnings. let's just disable this option. the only effect of this option is to add -Werror to CFLAGS. but the building warnings from DPDK is not our focus when developing Ceph in the most cases. so it should be fine. see also https://github.com/ceph/dpdk/blob/eac901ce29be559b1bb5c5da33fe2bf5c0b4bfd6/doc/build-sdk-quick.txt#L18 Signed-off-by: Kefu Chai (cherry picked from commit 91a616b26e830e85962200d0bac86bee7e022892) Conflicts: cmake/modules/BuildDPDK.cmake [ commit d3c315703ae6 ("cmake: pass -Wunused-but-set-variable when building dpdk") not in pacific ] --- cmake/modules/BuildDPDK.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/BuildDPDK.cmake b/cmake/modules/BuildDPDK.cmake index b33bda0a9b6f..cb418b48e38c 100644 --- a/cmake/modules/BuildDPDK.cmake +++ b/cmake/modules/BuildDPDK.cmake @@ -86,7 +86,7 @@ function(do_build_dpdk dpdk_dir) ExternalProject_Add(dpdk-ext SOURCE_DIR ${dpdk_source_dir} CONFIGURE_COMMAND ${make_cmd} config O=${dpdk_dir} T=${target} - BUILD_COMMAND ${make_cmd} O=${dpdk_dir} CC=${CMAKE_C_COMPILER} EXTRA_CFLAGS=-fPIC + BUILD_COMMAND ${make_cmd} O=${dpdk_dir} CC=${CMAKE_C_COMPILER} EXTRA_CFLAGS=-fPIC RTE_DEVEL_BUILD=n BUILD_IN_SOURCE 1 INSTALL_COMMAND "true") if(NUMA_FOUND) -- 2.47.3