diff options
Diffstat (limited to 'community/bcc/10-use-system-libbpf.patch')
-rw-r--r-- | community/bcc/10-use-system-libbpf.patch | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/community/bcc/10-use-system-libbpf.patch b/community/bcc/10-use-system-libbpf.patch index c77e15cf57..794f454d04 100644 --- a/community/bcc/10-use-system-libbpf.patch +++ b/community/bcc/10-use-system-libbpf.patch @@ -1,23 +1,22 @@ diff --git a/introspection/CMakeLists.txt b/introspection/CMakeLists.txt -index 88df6e84..4ee79d46 100644 +index 91eac43c..f52cf654 100644 --- a/introspection/CMakeLists.txt +++ b/introspection/CMakeLists.txt -@@ -3,11 +3,11 @@ - +@@ -4,10 +4,11 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc) include_directories(${CMAKE_SOURCE_DIR}/src/cc/api) --include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) + include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) +include_directories(/usr/include/uapi) option(INSTALL_INTROSPECTION "Install BPF introspection tools" ON) add_executable(bps bps.c) --target_link_libraries(bps bpf-static) -+target_link_libraries(bps bccbpf-static) +-target_link_libraries(bps bpf-static elf) ++target_link_libraries(bps bccbpf-static elf) install (TARGETS bps DESTINATION share/bcc/introspection) diff --git a/introspection/bps.c b/introspection/bps.c -index 5e510aa4..eb7bb0e3 100644 +index 59160938..e3fc22c7 100644 --- a/introspection/bps.c +++ b/introspection/bps.c @@ -8,6 +8,7 @@ @@ -29,7 +28,7 @@ index 5e510aa4..eb7bb0e3 100644 #include "libbpf.h" diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt -index 571a4637..07aa3d42 100644 +index c53c542f..c4675dee 100644 --- a/src/cc/CMakeLists.txt +++ b/src/cc/CMakeLists.txt @@ -10,8 +10,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/frontends/clang) @@ -43,11 +42,10 @@ index 571a4637..07aa3d42 100644 add_definitions(${LLVM_DEFINITIONS}) configure_file(libbcc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc @ONLY) -@@ -28,12 +28,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_MAJOR_VERSION=${CMAKE_MATCH_1}") +@@ -44,11 +44,13 @@ endif() - include(static_libstdc++) + set(libbpf_uapi libbpf/include/uapi/linux}) --file(GLOB libbpf_sources "libbpf/src/*.c") -add_library(bpf-static STATIC libbpf.c perf_reader.c ${libbpf_sources}) -set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bcc_bpf) -add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources}) @@ -63,28 +61,28 @@ index 571a4637..07aa3d42 100644 set(bcc_common_sources bcc_common.cc bpf_module.cc bcc_btf.cc exported_files.cc) if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6) -@@ -79,11 +80,11 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f - - # bcc_common_libs_for_a for archive libraries - # bcc_common_libs_for_s for shared libraries --set(bcc_common_libs_for_a b_frontend clang_frontend bpf-static -+set(bcc_common_libs_for_a b_frontend clang_frontend bccbpf-static bpf +@@ -107,10 +109,10 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f + set(bcc_common_libs b_frontend clang_frontend -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive ${LIBELF_LIBRARIES}) - set(bcc_common_libs_for_s ${bcc_common_libs_for_a}) +-set(bcc_common_libs_for_a ${bcc_common_libs} bpf-static) +-set(bcc_common_libs_for_s ${bcc_common_libs} bpf-static) ++set(bcc_common_libs_for_a ${bcc_common_libs} bccbpf-static bpf) ++set(bcc_common_libs_for_s ${bcc_common_libs} bccbpf-static bpf) + set(bcc_common_libs_for_n ${bcc_common_libs}) -set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static +set(bcc_common_libs_for_lua b_frontend clang_frontend bccbpf-static bpf ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES}) if(ENABLE_CPP_API) -@@ -115,4 +116,4 @@ install(DIRECTORY libbpf/include/uapi/linux/ DESTINATION include/bcc/compat/linu +@@ -149,4 +151,4 @@ install(DIRECTORY ${libbpf_uapi} DESTINATION include/bcc/compat/linux FILES_MATC install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif(ENABLE_CLANG_JIT) install(FILES ${bcc_common_headers} DESTINATION include/bcc) -install(TARGETS bpf-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(TARGETS bccbpf-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/cc/bcc_btf.cc b/src/cc/bcc_btf.cc -index 12816757..bd26f69f 100644 +index f7773fd4..d6e5f02a 100644 --- a/src/cc/bcc_btf.cc +++ b/src/cc/bcc_btf.cc @@ -17,10 +17,12 @@ @@ -103,10 +101,10 @@ index 12816757..bd26f69f 100644 #define BCC_MAX_ERRNO 4095 diff --git a/src/cc/bpf_module.cc b/src/cc/bpf_module.cc -index c27ce9c8..5f61a71c 100644 +index 3df7ef18..7f7a26f3 100644 --- a/src/cc/bpf_module.cc +++ b/src/cc/bpf_module.cc -@@ -44,7 +44,7 @@ +@@ -45,7 +45,7 @@ #include "exported_files.h" #include "libbpf.h" #include "bcc_btf.h" @@ -116,7 +114,7 @@ index c27ce9c8..5f61a71c 100644 namespace ebpf { diff --git a/src/cc/frontends/clang/b_frontend_action.cc b/src/cc/frontends/clang/b_frontend_action.cc -index cb1f5b1c..6a13f5d6 100644 +index 5697f2f9..4708e9b0 100644 --- a/src/cc/frontends/clang/b_frontend_action.cc +++ b/src/cc/frontends/clang/b_frontend_action.cc @@ -34,7 +34,7 @@ @@ -129,7 +127,7 @@ index cb1f5b1c..6a13f5d6 100644 #include "libbpf.h" diff --git a/src/cc/libbpf.c b/src/cc/libbpf.c -index 8459ecf0..4e1d2b45 100644 +index 111f0195..cf154345 100644 --- a/src/cc/libbpf.c +++ b/src/cc/libbpf.c @@ -52,8 +52,8 @@ |