Skip to content

Commit

Permalink
libbcc: assume HAVE_BCC_WHICH_SO
Browse files Browse the repository at this point in the history
  • Loading branch information
Delyan Kratunov authored and BurntBrunch committed Nov 2, 2022
1 parent 20beac2 commit 7341526
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions src/ast/attachpoint_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
#include <string>
#include <unordered_map>
#include <vector>

#ifdef HAVE_BCC_WHICH_SO
#include <bcc/bcc_proc.h>
#endif

#include "ast/int_parser.h"
#include "log.h"
#include "types.h"
Expand Down Expand Up @@ -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.
Expand All @@ -400,7 +395,6 @@ AttachPointParser::State AttachPointParser::uprobe_parser(bool allow_offset,
if (lib_path)
ap_->target = lib_path;
}
#endif

if (ap_->target.empty())
{
Expand Down
6 changes: 0 additions & 6 deletions src/build_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7341526

Please sign in to comment.