summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2021-07-09 10:09:39 -0700
committerPatrick McLean <chutzpah@gentoo.org>2021-07-09 10:11:31 -0700
commitbe8e4e44dfb0c9dd8521dcdaa886e6efae106556 (patch)
tree73f9bedca8cd35148cc5cf57be7ab41868e8e1f1 /dev-util/bpftrace/files
parentsys-fs/udev: sync live (diff)
downloadgentoo-be8e4e44dfb0c9dd8521dcdaa886e6efae106556.tar.gz
gentoo-be8e4e44dfb0c9dd8521dcdaa886e6efae106556.tar.bz2
gentoo-be8e4e44dfb0c9dd8521dcdaa886e6efae106556.zip
dev-util/bpftrace-0.13.0: Version bump
Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/bpftrace/files')
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.13.0-install-libs.patch143
1 files changed, 143 insertions, 0 deletions
diff --git a/dev-util/bpftrace/files/bpftrace-0.13.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.13.0-install-libs.patch
new file mode 100644
index 000000000000..03fd2d13e602
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.13.0-install-libs.patch
@@ -0,0 +1,143 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e33bb1ca..52e1fa25 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -100,9 +100,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 a95c60a1..f5c4d676 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 0361cdaa..f9c536a3 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -49,6 +49,7 @@ add_executable(${BPFTRACE}
+ )
+
+ install(TARGETS ${BPFTRACE} DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(TARGETS libbpftrace LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ target_link_libraries(${BPFTRACE} libbpftrace)
+
+ if (BUILD_FUZZ)
+@@ -109,7 +110,7 @@ if(STATIC_LINKING)
+ endif(STATIC_LINKING)
+
+
+-target_link_libraries(libbpftrace parser resources ast arch)
++target_link_libraries(libbpftrace bpftraceparser bpftraceresources bpftraceast bpftracearch)
+
+ if (LIBBPF_BTF_DUMP_FOUND)
+ target_include_directories(libbpftrace PUBLIC ${LIBBPF_INCLUDE_DIRS})
+diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt
+index 76bb217e..6d243a7e 100644
+--- a/src/arch/CMakeLists.txt
++++ b/src/arch/CMakeLists.txt
+@@ -1,15 +1,15 @@
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+- add_library(arch aarch64.cpp)
++ add_library(bpftracearch aarch64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
+- add_library(arch ppc64.cpp)
++ add_library(bpftracearch ppc64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
+- add_library(arch s390.cpp)
++ add_library(bpftracearch s390.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+- add_library(arch x86_64.cpp)
++ add_library(bpftracearch x86_64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips64")
+- add_library(arch mips64.cpp)
++ add_library(bpftracearch mips64.cpp)
+ else()
+ message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
+ endif()
+diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt
+index 5234388c..8b40faaa 100644
+--- a/src/ast/CMakeLists.txt
++++ b/src/ast/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-add_library(ast
++add_library(bpftraceast
+ ast.cpp
+ attachpoint_parser.cpp
+ codegen_llvm.cpp
+@@ -13,17 +13,18 @@ add_library(ast
+ signal.cpp
+ visitors.cpp
+ )
++install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+-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)
+
+ if (HAVE_BCC_KFUNC)
+- target_compile_definitions(ast PRIVATE HAVE_BCC_KFUNC)
++ target_compile_definitions(bpftraceast PRIVATE HAVE_BCC_KFUNC)
+ endif(HAVE_BCC_KFUNC)
+
+-add_dependencies(ast parser)
++add_dependencies(bpftraceast bpftraceparser)
+
+ if (STATIC_LINKING)
+ set(clang_libs
+@@ -54,11 +55,11 @@ if (STATIC_LINKING)
+
+
+ if(EMBED_USE_LLVM)
+- target_link_libraries(ast "-Wl,--start-group" ${CLANG_EMBEDDED_CMAKE_TARGETS} ${LLVM_EMBEDDED_CMAKE_TARGETS} "-Wl,--end-group")
++ target_link_libraries(bpftraceast "-Wl,--start-group" ${CLANG_EMBEDDED_CMAKE_TARGETS} ${LLVM_EMBEDDED_CMAKE_TARGETS} "-Wl,--end-group")
+ else()
+ llvm_map_components_to_libnames(llvm_libs ${llvm_lib_names})
+- target_link_libraries(ast ${clang_libs})
+- target_link_libraries(ast ${llvm_libs})
++ target_link_libraries(bpftraceast ${clang_libs})
++ target_link_libraries(bpftraceast ${llvm_libs})
+ endif()
+
+ if(STATIC_LIBC)
+@@ -68,11 +69,11 @@ if (STATIC_LINKING)
+ 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()