mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-04 00:08:09 -07:00
All merged upstream, except for the build fix silencing git. Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/45976 Closes: https://github.com/gentoo/gentoo/pull/45976 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
54 lines
2.2 KiB
Diff
54 lines
2.2 KiB
Diff
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 <kernel-dir>
|