From 73415260e0b0a067f24740ee4cc2c6e18329a775 Mon Sep 17 00:00:00 2001 From: Delyan Kratunov Date: Thu, 20 Oct 2022 12:14:51 -0700 Subject: [PATCH] libbcc: assume HAVE_BCC_WHICH_SO --- CMakeLists.txt | 16 ---------------- src/ast/attachpoint_parser.cpp | 6 ------ src/build_info.cpp | 6 ------ 3 files changed, 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a8c67b0125a..bbbac55f7ff8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,18 +145,6 @@ endif() if(POLICY CMP0075) cmake_policy(SET CMP0075 NEW) endif() -if(STATIC_BPF_BCC) - set(CMAKE_REQUIRED_LIBRARIES bcc bcc_bpf bpf elf z) -else() - set(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_LIBRARIES} ${LIBBPF_LIBRARIES}) -endif(STATIC_BPF_BCC) -get_filename_component(LIBBCC_LIBDIR ${LIBBCC_LIBRARIES} DIRECTORY) -set(CMAKE_REQUIRED_LINK_OPTIONS -L${LIBBCC_LIBDIR}) - -check_symbol_exists(bcc_procutils_which_so "${LIBBCC_INCLUDE_DIRS}/bcc/bcc_proc.h" HAVE_BCC_WHICH_SO) - -set(CMAKE_REQUIRED_LIBRARIES) -set(CMAKE_REQUIRED_LINK_OPTIONS) if(${LIBBFD_FOUND} AND ${LIBOPCODES_FOUND}) set(HAVE_BFD_DISASM TRUE) @@ -212,10 +200,6 @@ if(HAVE_NAME_TO_HANDLE_AT) set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_NAME_TO_HANDLE_AT=1) endif(HAVE_NAME_TO_HANDLE_AT) -if(HAVE_BCC_WHICH_SO) - set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_BCC_WHICH_SO) -endif(HAVE_BCC_WHICH_SO) - if(HAVE_BFD_DISASM) set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_BFD_DISASM) if(LIBBFD_DISASM_FOUR_ARGS_SIGNATURE) diff --git a/src/ast/attachpoint_parser.cpp b/src/ast/attachpoint_parser.cpp index 9e51cc34521a..9de84b4ad97f 100644 --- a/src/ast/attachpoint_parser.cpp +++ b/src/ast/attachpoint_parser.cpp @@ -6,11 +6,7 @@ #include #include #include - -#ifdef HAVE_BCC_WHICH_SO #include -#endif - #include "ast/int_parser.h" #include "log.h" #include "types.h" @@ -388,7 +384,6 @@ AttachPointParser::State AttachPointParser::uprobe_parser(bool allow_offset, ap_->target = ""; -#ifdef HAVE_BCC_WHICH_SO if (!has_wildcard(parts_[1]) && parts_[1].find("lib") == 0) { // Automatic resolution of shared library paths. @@ -400,7 +395,6 @@ AttachPointParser::State AttachPointParser::uprobe_parser(bool allow_offset, if (lib_path) ap_->target = lib_path; } -#endif if (ap_->target.empty()) { diff --git a/src/build_info.cpp b/src/build_info.cpp index ae8d7cdfa32b..c3dccad2a68b 100644 --- a/src/build_info.cpp +++ b/src/build_info.cpp @@ -23,12 +23,6 @@ std::string BuildInfo::report() << "yes" << std::endl; #else << "no" << std::endl; -#endif - buf << " bcc library path resolution: " -#ifdef HAVE_BCC_WHICH_SO - << "yes" << std::endl; -#else - << "no" << std::endl; #endif buf << " libdw (DWARF support): " #ifdef HAVE_LIBDW