Do not try to update the tarball-bundled libbpf with git, which only throws confusing errors. diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e497e6..62ef3fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,45 +39,6 @@ if(NOT NO_BLAZESYM) endif() endif() -# populate submodules (libbpf) -if(NOT CMAKE_USE_LIBBPF_PACKAGE) - execute_process(COMMAND git config --global --add safe.directory ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE CONFIG_RESULT) - if(CONFIG_RESULT AND NOT CONFIG_RESULT EQUAL 0) - message(WARNING "Failed to add libbpf source directory to safe.directory") - endif() - execute_process(COMMAND git config --global --add safe.directory ${CMAKE_CURRENT_SOURCE_DIR}/libbpf-tools/bpftool - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE CONFIG_RESULT) - if(CONFIG_RESULT AND NOT CONFIG_RESULT EQUAL 0) - message(WARNING "Failed to add bpftool source directory to safe.directory") - endif() - - if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src) - execute_process(COMMAND git submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE UPDATE_RESULT) - if(UPDATE_RESULT AND NOT UPDATE_RESULT EQUAL 0) - message(WARNING "Failed to update submodule libbpf") - endif() - else() - execute_process(COMMAND git diff --shortstat ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/ - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE DIFF_STATUS) - if("${DIFF_STATUS}" STREQUAL "") - execute_process(COMMAND git submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE UPDATE_RESULT) - if(UPDATE_RESULT AND NOT UPDATE_RESULT EQUAL 0) - message(WARNING "Failed to update submodule libbpf") - endif() - else() - message(WARNING "submodule libbpf dirty, so no sync") - endif() - endif() -endif() - # It's possible to use other kernel headers with # KERNEL_INCLUDE_DIRS build variable, like: # $ cd