summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2019-06-14 14:03:02 -0700
committerPatrick McLean <chutzpah@gentoo.org>2019-06-14 14:03:36 -0700
commit4755d09cbd780ec84807b1190364591c76988de5 (patch)
tree020dcbb97f9535b4e5266bec61d7caf199bbcf97 /dev-util/bpftrace
parentdev-libs/libbpf: Remove old snapshots (diff)
downloadgentoo-4755d09cbd780ec84807b1190364591c76988de5.tar.gz
gentoo-4755d09cbd780ec84807b1190364591c76988de5.tar.bz2
gentoo-4755d09cbd780ec84807b1190364591c76988de5.zip
dev-util/bpftrace: Update live ebuild to work with current git
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/bpftrace')
-rw-r--r--dev-util/bpftrace/bpftrace-9999.ebuild8
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch115
2 files changed, 119 insertions, 4 deletions
diff --git a/dev-util/bpftrace/bpftrace-9999.ebuild b/dev-util/bpftrace/bpftrace-9999.ebuild
index 74351e85e8c4..659b5f9766a9 100644
--- a/dev-util/bpftrace/bpftrace-9999.ebuild
+++ b/dev-util/bpftrace/bpftrace-9999.ebuild
@@ -22,10 +22,11 @@ LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
-COMMON_DEPEND="sys-devel/clang:=
+COMMON_DEPEND="dev-util/systemtap
+ sys-devel/clang:=
dev-libs/libbpf:=
>=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)]
- >=dev-util/bcc-0.9.0:=
+ >=dev-util/bcc-0.10.0:=
virtual/libelf"
DEPEND="${COMMON_DEPEND}
test? ( dev-cpp/gtest )"
@@ -37,9 +38,8 @@ BDEPEND+="dev-util/cmake
QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so"
PATCHES=(
- "${FILESDIR}/bpftrace-0.9_pre20190311-install-libs.patch"
+ "${FILESDIR}/bpftrace-0.10_pre20190614-install-libs.patch"
"${FILESDIR}/bpftrace-mandir.patch"
- "${FILESDIR}/bpftrace-0.9-llvm-8.patch"
)
# lots of fixing needed
diff --git a/dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch
new file mode 100644
index 000000000000..f4483570c996
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch
@@ -0,0 +1,115 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e8870c6..a55385d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,9 +47,10 @@ find_package(FLEX REQUIRED)
+ bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc VERBOSE)
+ flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc)
+ add_flex_bison_dependency(flex_lexer bison_parser)
+-add_library(parser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS})
+-target_compile_options(parser PRIVATE "-w")
+-target_include_directories(parser PUBLIC src src/ast ${CMAKE_BINARY_DIR})
++add_library(bpftraceparser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS})
++target_compile_options(bpftraceparser PRIVATE "-w")
++target_include_directories(bpftraceparser PUBLIC src src/ast ${CMAKE_BINARY_DIR})
++install(TARGETS bpftraceparser LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ include(CheckSymbolExists)
+ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt
+index b8b0d96..0803c1e 100644
+--- a/resources/CMakeLists.txt
++++ b/resources/CMakeLists.txt
+@@ -1,6 +1,7 @@
+-add_library(resources headers.cpp)
++add_library(bpftraceresources headers.cpp)
+
+-target_include_directories(resources PUBLIC ../src)
++target_include_directories(bpftraceresources PUBLIC ../src)
++install(TARGETS bpftraceresources LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ function(embed_headers output)
+ file(WRITE ${output} "#include \"headers.h\"\n\nnamespace bpftrace {\n")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e737119..b2b17e2 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -30,7 +30,8 @@ endif(HAVE_BCC_ELF_FOREACH_SYM)
+ if(HAVE_GET_CURRENT_CGROUP_ID)
+ target_compile_definitions(bpftrace PRIVATE HAVE_GET_CURRENT_CGROUP_ID)
+ endif(HAVE_GET_CURRENT_CGROUP_ID)
+-target_link_libraries(bpftrace arch ast parser resources)
++target_link_libraries(bpftrace bpftracearch bpftraceast bpftraceparser
++ bpftraceresources)
+
+ if (STATIC_LINKING)
+ target_link_libraries(bpftrace ${LIBBCC_LIBRARIES})
+diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt
+index a26f610..53627e2 100644
+--- a/src/arch/CMakeLists.txt
++++ b/src/arch/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+- add_library(arch aarch64.cpp)
++ add_library(bpftracearch aarch64.cpp)
+ else()
+- add_library(arch x86_64.cpp)
++ add_library(bpftracearch x86_64.cpp)
+ endif()
++
++install(TARGETS bpftracearch LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt
+index 4d77c9f..2a00572 100644
+--- a/src/ast/CMakeLists.txt
++++ b/src/ast/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-add_library(ast
++add_library(bpftraceast
+ ast.cpp
+ codegen_llvm.cpp
+ irbuilderbpf.cpp
+@@ -7,15 +7,16 @@ add_library(ast
+ )
+
+ if(HAVE_GET_CURRENT_CGROUP_ID)
+- target_compile_definitions(ast PRIVATE HAVE_GET_CURRENT_CGROUP_ID)
++ target_compile_definitions(bpftraceast PRIVATE HAVE_GET_CURRENT_CGROUP_ID)
+ endif(HAVE_GET_CURRENT_CGROUP_ID)
+
+-target_include_directories(ast PUBLIC ${CMAKE_SOURCE_DIR}/src)
+-target_include_directories(ast PUBLIC ${CMAKE_SOURCE_DIR}/src/ast)
+-target_include_directories(ast PUBLIC ${CMAKE_BINARY_DIR})
+-target_link_libraries(ast arch)
++target_include_directories(bpftraceast PUBLIC ${CMAKE_SOURCE_DIR}/src)
++target_include_directories(bpftraceast PUBLIC ${CMAKE_SOURCE_DIR}/src/ast)
++target_include_directories(bpftraceast PUBLIC ${CMAKE_BINARY_DIR})
++target_link_libraries(bpftraceast bpftracearch)
+
+-add_dependencies(ast parser)
++add_dependencies(bpftraceast bpftraceparser)
++install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ if (STATIC_LINKING)
+ set(clang_libs
+@@ -35,16 +36,16 @@ if (STATIC_LINKING)
+ clangSerialization
+ clangToolingCore)
+ llvm_map_components_to_libnames(llvm_libs bpfcodegen ipo irreader mcjit orcjit ${LLVM_TARGETS_TO_BUILD})
+- target_link_libraries(ast ${clang_libs})
+- target_link_libraries(ast ${llvm_libs})
++ target_link_libraries(bpftraceast ${clang_libs})
++ target_link_libraries(bpftraceast ${llvm_libs})
+ else()
+ find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS})
+ if(found_LLVM)
+- target_link_libraries(ast LLVM)
++ target_link_libraries(bpftraceast LLVM)
+ else()
+ llvm_map_components_to_libnames(_llvm_libs bpfcodegen ipo irreader mcjit orcjit ${LLVM_TARGETS_TO_BUILD})
+ llvm_expand_dependencies(llvm_libs ${_llvm_libs})
+- target_link_libraries(ast ${llvm_libs})
++ target_link_libraries(bpftraceast ${llvm_libs})
+ endif()
+- target_link_libraries(ast libclang)
++ target_link_libraries(bpftraceast libclang)
+ endif()