summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2023-01-30 11:08:30 -0800
committerPatrick McLean <chutzpah@gentoo.org>2023-01-30 11:10:12 -0800
commit8a1f60be59370d648a6216df8586c7f316f7f21d (patch)
treef61074b5880863f27b53f2b54c56d178bf91e4af /dev-util
parentdev-util/bpftrace: add 0.17.0 (diff)
downloadgentoo-8a1f60be59370d648a6216df8586c7f316f7f21d.tar.gz
gentoo-8a1f60be59370d648a6216df8586c7f316f7f21d.tar.bz2
gentoo-8a1f60be59370d648a6216df8586c7f316f7f21d.zip
dev-util/bpftrace: drop 0.15.0-r2
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild95
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.15.0-bcc-025.patch88
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.15.0-binutils-2.39.patch87
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch47
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch199
5 files changed, 0 insertions, 516 deletions
diff --git a/dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild b/dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild
deleted file mode 100644
index f0998d9f30ca..000000000000
--- a/dev-util/bpftrace/bpftrace-0.15.0-r2.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 2019-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LLVM_MAX_SLOT=15
-
-inherit llvm linux-info cmake toolchain-funcs
-
-DESCRIPTION="High-level tracing language for eBPF"
-HOMEPAGE="https://github.com/iovisor/bpftrace"
-MY_PV="${PV//_/}"
-SRC_URI="
- https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
- https://dev.gentoo.org/~chutzpah/dist/bpftrace/bpftrace-0.14.1-llvm14.patch.gz
-"
-S="${WORKDIR}/${PN}-${MY_PV:-${PV}}"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="fuzzing test"
-# lots of fixing needed
-RESTRICT="test"
-
-RDEPEND="
- >=dev-libs/libbpf-0.8:=
- <dev-libs/libbpf-1.0:=
- >=dev-util/bcc-0.13.0:=
- dev-util/systemtap
- <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
- <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_BPF(+)]
- sys-libs/binutils-libs:=
- virtual/libelf:=
-"
-DEPEND="
- ${COMMON_DEPEND}
- dev-libs/cereal:=
- test? ( dev-cpp/gtest )
-"
-BDEPEND="
- app-arch/xz-utils
- sys-devel/flex
- sys-devel/bison
- virtual/pkgconfig
-"
-
-QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so"
-
-PATCHES=(
- "${FILESDIR}/bpftrace-0.15.0-install-libs.patch"
- "${FILESDIR}/bpftrace-0.15.0-dont-compress-man.patch"
- "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch"
- "${FILESDIR}/bpftrace-0.15.0-bcc-025.patch"
- "${FILESDIR}/bpftrace-0.15.0-binutils-2.39.patch"
- "${FILESDIR}/bpftrace-0.15.0-llvm-15-pointers.patch"
-)
-
-pkg_pretend() {
- local CONFIG_CHECK="
- ~BPF
- ~BPF_EVENTS
- ~BPF_JIT
- ~BPF_SYSCALL
- ~FTRACE_SYSCALLS
- ~HAVE_EBPF_JIT
- "
-
- check_extra_config
-}
-
-pkg_setup() {
- llvm_pkg_setup
-}
-
-src_configure() {
- local mycmakeargs=(
- -DSTATIC_LINKING:BOOL=OFF
- # bug 809362, 754648
- -DBUILD_SHARED_LIBS:=OFF
- -DBUILD_TESTING:BOOL=OFF
- -DBUILD_FUZZ:BOOL=$(usex fuzzing)
- -DENABLE_MAN:BOOL=OFF
- -DLIBBPF_INCLUDE_DIRS="$($(tc-getPKG_CONFIG) --cflags-only-I libbpf | sed 's:-I::g')"
- )
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- # bug 809362
- dostrip -x /usr/bin/bpftrace
- doman man/man8/*.?
-}
diff --git a/dev-util/bpftrace/files/bpftrace-0.15.0-bcc-025.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-bcc-025.patch
deleted file mode 100644
index ef2ca76e1c50..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.15.0-bcc-025.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From f86c3bde84d9e75ec2780a51a1ca7dc20a4740e6 Mon Sep 17 00:00:00 2001
-From: Dominique Martinet <asmadeus@codewreck.org>
-Date: Thu, 25 Aug 2022 21:47:30 +0900
-Subject: [PATCH] Fix builds against bcc >= 0.25.0
-
-libbpf 1.0.0 removed bpf_load_program_attr in
-https://github.com/libbpf/libbpf/commit/9476dce6fe905a6bf1d4c483f7b2b8575c4ffb2d
-and bcc 0.25.0 in turn changed bcc_prog_load_xattr to use
-bpf_prog_load_opts instead in
-https://github.com/iovisor/bcc/commit/185143bdec6134255363446f644acd766ffb3825
-
-Add a compile check to use the appropriate version
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c5c4c39630d2..f23b2ba52740 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -138,7 +138,7 @@ check_symbol_exists(bpf_attach_kfunc "${LIBBCC_INCLUDE_DIRS}/bcc/libbpf.h" HAVE_
- check_symbol_exists(bcc_usdt_addsem_probe "${LIBBCC_INCLUDE_DIRS}/bcc/bcc_usdt.h" HAVE_BCC_USDT_ADDSEM)
- check_symbol_exists(bcc_procutils_which_so "${LIBBCC_INCLUDE_DIRS}/bcc/bcc_proc.h" HAVE_BCC_WHICH_SO)
-
--# bcc_prog_load_xattr needs struct bpf_load_program_attr,
-+# bcc_prog_load_xattr needs struct bpf_prog_load_opts or bpf_load_program_attr,
- # which is defined in libbpf
- if (LIBBPF_FOUND)
- check_symbol_exists(bcc_prog_load_xattr "${LIBBCC_INCLUDE_DIRS}/bcc/libbpf.h" HAVE_BCC_PROG_LOAD_XATTR)
-@@ -236,6 +236,10 @@ if(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
- set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
- endif(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
-
-+if(LIBBCC_PROG_LOAD_XATTRS_WITH_OPTS)
-+ set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" LIBBCC_PROG_LOAD_XATTRS_WITH_OPTS)
-+endif(LIBBCC_PROG_LOAD_XATTRS_WITH_OPTS)
-+
- if (HAVE_BCC_KFUNC)
- set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_BCC_KFUNC)
- endif(HAVE_BCC_KFUNC)
-diff --git a/cmake/FindLibBcc.cmake b/cmake/FindLibBcc.cmake
-index 7b4f12835786..20d2e68cd75f 100644
---- a/cmake/FindLibBcc.cmake
-+++ b/cmake/FindLibBcc.cmake
-@@ -85,6 +85,16 @@ int main(void) {
- return 0;
- }
- " LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
-+CHECK_CXX_SOURCE_COMPILES("
-+#include <bcc/libbpf.h>
-+
-+int main(void) {
-+ struct bpf_prog_load_opts *opts = (struct bpf_prog_load_opts*) 1;
-+
-+ bcc_prog_load_xattr(BPF_PROG_TYPE_UNSPEC, 0, 0, 0, opts, 0, 0, 0, true);
-+ return 0;
-+}
-+" LIBBCC_PROG_LOAD_XATTRS_WITH_OPTS)
- SET(CMAKE_REQUIRED_INCLUDES)
-
- SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_BPF_LIBRARIES})
-diff --git a/src/attached_probe.cpp b/src/attached_probe.cpp
-index 60778e53ce44..dd46f15fd8d2 100644
---- a/src/attached_probe.cpp
-+++ b/src/attached_probe.cpp
-@@ -731,7 +731,24 @@ void AttachedProbe::load_prog()
- continue;
- }
-
--#ifdef HAVE_BCC_PROG_LOAD_XATTR
-+#ifdef LIBBCC_PROG_LOAD_XATTRS_WITH_OPTS
-+ struct bpf_prog_load_opts opts = { };
-+
-+ opts.sz = sizeof(opts);
-+ opts.log_level = log_level;
-+
-+ progfd_ = bcc_prog_load_xattr(
-+ progtype(probe_.type),
-+ name.c_str(),
-+ license,
-+ reinterpret_cast<struct bpf_insn *>(insns),
-+ &opts,
-+ prog_len,
-+ log_buf.get(),
-+ log_buf_size,
-+ true);
-+
-+#elif HAVE_BCC_PROG_LOAD_XATTR
- struct bpf_load_program_attr attr = {};
-
- attr.prog_type = progtype(probe_.type);
diff --git a/dev-util/bpftrace/files/bpftrace-0.15.0-binutils-2.39.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-binutils-2.39.patch
deleted file mode 100644
index cb4b8a9bb2d2..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.15.0-binutils-2.39.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-
-Patch taken from: https://github.com/iovisor/bpftrace/pull/2328
-Removed hunk #1 (CHANGELOG.md) since it conflicts and is not required.
-Bug: https://bugs.gentoo.org/868120
-
-From 3be6e708d514d3378a4fe985ab907643ecbc77ee Mon Sep 17 00:00:00 2001
-From: Viktor Malik <viktor.malik@gmail.com>
-Date: Mon, 15 Aug 2022 15:13:14 +0200
-Subject: [PATCH] Fix builds against libbfd(binutils) >=2.39
-
-Binutils 2.39 changed signature of the init_disassemble_info function by
-adding an extra parameter for styled printf function. Let CMake detect
-which of the versions is present and call it appropriately.
----
- CHANGELOG.md | 2 ++
- CMakeLists.txt | 3 +++
- cmake/FindLibBfd.cmake | 10 ++++++++++
- src/bfd-disasm.cpp | 14 ++++++++++++++
- 4 files changed, 29 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8f7995afd2..2e54eb84f8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -249,6 +249,9 @@ if(HAVE_BFD_DISASM)
- if(LIBBFD_DISASM_FOUR_ARGS_SIGNATURE)
- set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" LIBBFD_DISASM_FOUR_ARGS_SIGNATURE)
- endif(LIBBFD_DISASM_FOUR_ARGS_SIGNATURE)
-+ if(LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE)
-+ set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE)
-+ endif(LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE)
- endif(HAVE_BFD_DISASM)
-
- if (LIBBPF_BTF_DUMP_FOUND)
-diff --git a/cmake/FindLibBfd.cmake b/cmake/FindLibBfd.cmake
-index 4f4b8c4e20..5d917b188c 100644
---- a/cmake/FindLibBfd.cmake
-+++ b/cmake/FindLibBfd.cmake
-@@ -75,5 +75,15 @@ int main(void) {
- abfd);
- return 0;
- }" LIBBFD_DISASM_FOUR_ARGS_SIGNATURE)
-+CHECK_CXX_SOURCE_COMPILES("
-+// See comment in bfd-disasm.cpp for why this needs to exist
-+#define PACKAGE \"bpftrace-test\"
-+#include <dis-asm.h>
-+
-+int main(void) {
-+ init_disassemble_info(NULL, NULL, NULL, NULL);
-+ return 0;
-+}
-+" LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE)
- SET(CMAKE_REQUIRED_LIBRARIES)
- endif()
-diff --git a/src/bfd-disasm.cpp b/src/bfd-disasm.cpp
-index f846468cd8..d4165dfac5 100644
---- a/src/bfd-disasm.cpp
-+++ b/src/bfd-disasm.cpp
-@@ -38,6 +38,16 @@ static int fprintf_nop(void *out __attribute__((unused)), const char *fmt __attr
- return 0;
- }
-
-+#ifdef LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE
-+static int fprintf_styled_nop(void *out __attribute__((unused)),
-+ enum disassembler_style s __attribute__((unused)),
-+ const char *fmt __attribute__((unused)),
-+ ...)
-+{
-+ return 0;
-+}
-+#endif
-+
- static AlignState is_aligned_buf(void *buf, uint64_t size, uint64_t offset)
- {
- disassembler_ftype disassemble;
-@@ -55,7 +65,11 @@ static AlignState is_aligned_buf(void *buf, uint64_t size, uint64_t offset)
- return AlignState::Fail;
- }
-
-+#ifdef LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE
-+ init_disassemble_info(&info, stdout, fprintf_nop, fprintf_styled_nop);
-+#else
- init_disassemble_info(&info, stdout, fprintf_nop);
-+#endif
-
- info.arch = bfd_get_arch(bfdf);
- info.mach = bfd_get_mach(bfdf);
diff --git a/dev-util/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch
deleted file mode 100644
index 84241e052462..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/man/adoc/CMakeLists.txt b/man/adoc/CMakeLists.txt
-index 1a81dee0..c93ccbd2 100644
---- a/man/adoc/CMakeLists.txt
-+++ b/man/adoc/CMakeLists.txt
-@@ -1,7 +1,5 @@
--find_program(GZIP gzip REQUIRED)
- find_program(ASCIIDOCTOR asciidoctor)
- file(GLOB FILES *.adoc)
--set(GZFILES "")
- if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND")
- foreach(FIL ${FILES})
- get_filename_component(NAME ${FIL} NAME_WE)
-@@ -12,14 +10,9 @@ if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND")
- COMMAND ${ASCIIDOCTOR} ${FIL} -b manpage -o - > ${MANPAGE_FILE}
- DEPENDS ${FIL})
-
-- add_custom_command(OUTPUT ${GZ_MANPAGE_FILE}
-- COMMAND ${GZIP} -c ${MANPAGE_FILE} > ${GZ_MANPAGE_FILE}
-- DEPENDS ${MANPAGE_FILE})
--
-- list(APPEND GZFILES ${GZ_MANPAGE_FILE})
- endforeach()
-- add_custom_target(adoc_man DEPENDS ${GZFILES})
-- install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
-+ add_custom_target(adoc_man DEPENDS ${FILES})
-+ install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
- else()
- message(WARNING "asciidoctor not found, building without bpftrace manpage")
- add_custom_target(adoc_man)
-diff --git a/man/man8/CMakeLists.txt b/man/man8/CMakeLists.txt
-index 2a316cd9..2207cf80 100644
---- a/man/man8/CMakeLists.txt
-+++ b/man/man8/CMakeLists.txt
-@@ -1,12 +1,3 @@
--find_program(GZIP gzip REQUIRED)
- file(GLOB FILES *.8)
--set(GZFILES "")
--foreach(FIL ${FILES})
-- get_filename_component(NAME ${FIL} NAME)
-- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
-- COMMAND ${GZIP} -c ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
-- DEPENDS ${FIL})
-- list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz")
--endforeach()
- add_custom_target(man_man DEPENDS ${GZFILES})
--install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
-+install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
diff --git a/dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch
deleted file mode 100644
index b20e39e4d268..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c5c4c396..4bc3e499 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -103,9 +103,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 66a7fd66..738d9327 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -41,7 +41,7 @@ add_library(runtime
- ${BFD_DISASM_SRC}
- )
- # Ensure flex+bison outputs are built first
--add_dependencies(runtime parser)
-+add_dependencies(runtime bpftraceparser)
-
- add_library(libbpftrace
- build_info.cpp
-@@ -58,6 +58,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)
-@@ -110,6 +111,7 @@ target_include_directories(runtime PRIVATE ${CMAKE_BINARY_DIR})
- target_include_directories(runtime PRIVATE ${CMAKE_SOURCE_DIR}/src)
- target_include_directories(runtime PRIVATE ${CMAKE_SOURCE_DIR}/src/ast)
- target_compile_definitions(runtime PRIVATE ${BPFTRACE_FLAGS})
-+install(TARGETS runtime LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
- target_compile_definitions(libbpftrace PRIVATE ${BPFTRACE_FLAGS})
-
- # Linking
-@@ -122,7 +124,8 @@ if(STATIC_LINKING)
- endif(STATIC_LINKING)
-
-
--target_link_libraries(libbpftrace parser resources runtime aot ast arch cxxdemangler_llvm)
-+target_link_libraries(libbpftrace bpftraceparser bpftraceresources
-+ runtime aot bpftraceast bpftracearch cxxdemangler_llvm)
-
- if (LIBBPF_BTF_DUMP_FOUND)
- target_include_directories(runtime PUBLIC ${LIBBPF_INCLUDE_DIRS})
-diff --git a/src/aot/CMakeLists.txt b/src/aot/CMakeLists.txt
-index 291d53f2..22944ddc 100644
---- a/src/aot/CMakeLists.txt
-+++ b/src/aot/CMakeLists.txt
-@@ -2,6 +2,7 @@ add_library(aot aot.cpp)
- target_include_directories(aot PUBLIC ${CMAKE_SOURCE_DIR}/src)
- target_include_directories(aot PUBLIC ${CMAKE_BINARY_DIR})
- target_compile_definitions(aot PRIVATE ${BPFTRACE_FLAGS})
-+install(TARGETS aot LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
- # Only build aotrt if supported bcc is used
- # (https://github.com/iovisor/bcc/commit/719191867a25ce07dc96f7faf9b8ccedadc7ec44)
-@@ -10,7 +11,7 @@ if(NOT LIBBCC_BPF_CONTAINS_RUNTIME)
- endif()
-
- add_executable(bpftrace-aotrt aot_main.cpp)
--target_link_libraries(bpftrace-aotrt aot runtime arch ast_defs cxxdemangler_stdlib)
-+target_link_libraries(bpftrace-aotrt aot runtime bpftracearch ast_defs cxxdemangler_stdlib)
- install(TARGETS bpftrace-aotrt DESTINATION ${CMAKE_INSTALL_BINDIR})
-
- # Linking
-diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt
-index 127c3528..4e05d40a 100644
---- a/src/arch/CMakeLists.txt
-+++ b/src/arch/CMakeLists.txt
-@@ -1,17 +1,19 @@
- 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)
- elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
-- add_library(arch riscv64.cpp)
-+ add_library(bpftracearch riscv64.cpp)
- else()
- message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
- endif()
-+
-+install(TARGETS bpftracearch LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt
-index 014295cd..c35f6ac6 100644
---- a/src/ast/CMakeLists.txt
-+++ b/src/ast/CMakeLists.txt
-@@ -1,6 +1,6 @@
- add_library(ast_defs ast.cpp)
-
--add_library(ast
-+add_library(bpftraceast
- async_event_types.cpp
- attachpoint_parser.cpp
- int_parser.cpp
-@@ -20,11 +20,13 @@ add_library(ast
- target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src)
- target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src/ast)
- target_include_directories(ast_defs PUBLIC ${CMAKE_BINARY_DIR})
--target_link_libraries(ast ast_defs arch bpforc parser)
-+target_link_libraries(bpftraceast ast_defs bpftracearch bpforc bpftraceparser)
-+install(TARGETS ast_defs LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
--add_dependencies(ast_defs parser)
-+add_dependencies(ast_defs bpftraceparser)
-
--target_compile_definitions(ast PRIVATE ${BPFTRACE_FLAGS})
-+target_compile_definitions(bpftraceast PRIVATE ${BPFTRACE_FLAGS})
-
- if (STATIC_LINKING)
- set(clang_libs
-@@ -55,11 +57,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)
-@@ -69,13 +71,13 @@ 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()
-
- add_subdirectory(bpforc)
-diff --git a/src/ast/bpforc/CMakeLists.txt b/src/ast/bpforc/CMakeLists.txt
-index 3f6dbefa..8ccfbb2b 100644
---- a/src/ast/bpforc/CMakeLists.txt
-+++ b/src/ast/bpforc/CMakeLists.txt
-@@ -1 +1,2 @@
- add_library(bpforc bpforc.cpp)
-+install(TARGETS bpforc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-diff --git a/src/cxxdemangler/CMakeLists.txt b/src/cxxdemangler/CMakeLists.txt
-index 04cfcdd9..5677aa4b 100644
---- a/src/cxxdemangler/CMakeLists.txt
-+++ b/src/cxxdemangler/CMakeLists.txt
-@@ -1,2 +1,4 @@
- add_library(cxxdemangler_stdlib cxxdemangler_stdlib.cpp)
- add_library(cxxdemangler_llvm cxxdemangler_llvm.cpp)
-+install(TARGETS cxxdemangler_stdlib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+install(TARGETS cxxdemangler_llvm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})