summaryrefslogtreecommitdiff
path: root/dev-util/bpftrace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-19 23:10:29 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-19 23:10:29 +0100
commit318828e81fe6707ce5a64e6a59a76d4c0ca709f8 (patch)
treecc4b7818f7960cb193ad2bf7f7defe71adb3ee47 /dev-util/bpftrace
parent590c04803f88a968b4a750c0f420eb314e1fe968 (diff)
gentoo auto-resync : 19:09:2023 - 23:10:29
Diffstat (limited to 'dev-util/bpftrace')
-rw-r--r--dev-util/bpftrace/Manifest8
-rw-r--r--dev-util/bpftrace/bpftrace-0.19.0.ebuild (renamed from dev-util/bpftrace/bpftrace-0.17.1.ebuild)4
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch26
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch44
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.19.0-install-libs.patch (renamed from dev-util/bpftrace/files/bpftrace-0.17.0-install-libs.patch)71
5 files changed, 44 insertions, 109 deletions
diff --git a/dev-util/bpftrace/Manifest b/dev-util/bpftrace/Manifest
index 4f52720d3579..8e0c7e8e36be 100644
--- a/dev-util/bpftrace/Manifest
+++ b/dev-util/bpftrace/Manifest
@@ -1,14 +1,12 @@
AUX bpftrace-0.11.4-old-kernels.patch 563 BLAKE2B 3b2afb997119188e7095b24ec459f4b5ae28626f6905c45f6510f84b7c6f28aa3b5174f1f48a30763990b2a3cc50c6336249fe1dc4cf31656871a8adce43c8d7 SHA512 332e6cc4d1c21e917451c9aa6028b082f53dde8221419ba45ad7ae6321e444b3f67ec8366cbd56638d8f8b68a3be06af892eba765c810744951af1de9b994113
AUX bpftrace-0.15.0-dont-compress-man.patch 1885 BLAKE2B 89a327cef68fa838d5c04b37e7bf72e6b03b54c244889706ba3c5156e2355d00cf395d14a6e8a7fe622e002acf9bab06dbc1427f6b637f0c59db86af08f05d51 SHA512 b591a73b0bbdd0105e6b87fb264ca4345e200ab58754d09a87dec79e60044eab165f2b34fe5ddc904cd877a460d5f41eef8b4d59eac255ea4f4e0fae37cf3511
-AUX bpftrace-0.17.0-install-libs.patch 13720 BLAKE2B dd9e6c2fbd7e9b9d968d392d0585a612c0cd3d06bcdb2a8a58123742603e16001b4c946b83cd3ae4234eb18f547b0a4e28fd123f4ad63382ce35ec054afe8c96 SHA512 bff931ecd358237976fbfd7f2a966d9b734f96b4458b85fe1348de51993bc0ec976a2f88919a1c1eaa8844028b6cd963eaad6ff698498febf24d2418b415760b
-AUX bpftrace-0.17.0-llvm-16.patch 852 BLAKE2B f429d6b0f80e96ed51813ac257fe6b3b7154c6a81d3480905593f4e8726e4f48cbb366500038119208eb6dee8dbd8a255ee67690be02e67db55a662fcb2732b1 SHA512 64ab918984b8451c01806f4cb9e076a9c5cbcaf8209c8547f94c590fa37f843a6aab52344a782ed083ff5ddeb08eb2650039643db515fbf5c0ee433096d97ed3
-AUX bpftrace-0.17.0-use-std-optional.patch 1832 BLAKE2B fbe955e32135192b9e058f5b6fbea1b43608ac4eb7f8e30d157e8679350040b3919ac96a5d74b86ffddb5ce2e39d52bc1feece2a77b101b4b8eef6093e85ea49 SHA512 0325101a220996090e60b1681f97ac6587babf559b6cd814c8ebbcfe144ed9af9f9e3eace179e0a3f399e862392c8bbf6a344fa80006137717a8bdc0d3a2dfa5
AUX bpftrace-0.18.0-install-libs.patch 13680 BLAKE2B e86511999075c124647424f1589485e4efed63ffda30dc42a94cdd613ab408add4c08955127c2226d6128ab6885fa9f7af544e2dba897eaee611aa2f83ff282f SHA512 073a6bee013572aafd4d4ec0f45a5a8717dd9dbe5c1202884a9443d96104dcc013a3704a00b5c791643cf27a9812a57c1205bf8f96e2ec3140d9e53ac4dc0188
AUX bpftrace-0.18.1-install-libs.patch 13716 BLAKE2B fd6081956b59f11ab2c0103ce67813b28478e54ab4c9d64f222709b2dcaa648872936cdf7980a45132fe0be605043e0e46475e3e1f2134823643f4ce9c52a020 SHA512 d69a0ddb4c3322e0350f5718bc3383a78b47424324dc70039548add5ce42170ca1c936cce272352415c76b343ff39d2b85592c0a5f6425ad369b53e0ec75886c
-DIST bpftrace-0.17.1.gh.tar.gz 1035345 BLAKE2B 5dca6f3fc49458b4b2ed3068e3f99f1156067c430af36b53949e469a870101d2da6aba6c4d18bfaf173cc45eab18e3c316966a5e222a4b4cea98363a9afd90ce SHA512 57f00a0b209d745efe5ce39d0e8efb90a21b5c499b41385814378d828ef507dc2c6d9497f9d23dbb610fcff21f077cba9f7481e7a6a6465825065743289ef4ad
+AUX bpftrace-0.19.0-install-libs.patch 14102 BLAKE2B 626bcebeba565dec1e1ffb389731ab5a408262de4c52c58408d93a097a5fe955c0460c6bf710aa65e832d6f1e1023ecc68999125fd386e62e0dd24d13920e913 SHA512 02e064a7332bf7eeddfed3169d31eee7faa32048c01e8c0363e0a5632c4a65bb371e967bab8706ca97b59bea2d10eb46dd1b0bd2b998cc63163d90c25570ceba
DIST bpftrace-0.18.0.gh.tar.gz 1046210 BLAKE2B 921fdd56cff48e7b8fc2b8164839393f2759218accaa58412fdf80b2df4474067c3c660da09e3ee808d258c1f19b0534fa81462cbea5ce3e814bdbeaa7dce5aa SHA512 b7da273d251f03a81b3a7097407352e7ad1d023972852bdb883176e97bab7046f9f327bd03bca51fe853ecaab5f60adc6994e75cb450a033a5b91118f719c36d
DIST bpftrace-0.18.1.gh.tar.gz 1046307 BLAKE2B 67c5d586e803c16ae0338563953e86cb3fbf318410f5757824a56fdf049b4b4fe5cc2d2b7e0435c625728b0b25123bcc8d64eaa923c14334d9ec23075c8deeec SHA512 eb81554f4707f8c919930932ff6ec7602578c317c058238a16fe38d6db055da0d7b355733821203281767419aa8e1b2256bb7a921f50c987c85395ecfbda966a
-EBUILD bpftrace-0.17.1.ebuild 1934 BLAKE2B 97786852a27191f1d21618033a15c0a0da7a043cb6abc71f15240f7de4720a77139f4ace5d5f049f987ba60b7fb59eb8719b2b837b7d1cce7e98c72793f8eda0 SHA512 89e195cd57c499738f5e27137f3f0c640c1230a739fe6d4ccd264587eecd4a9ef3ba88aab67644c30cfe3e3456ea8114d8fa1eae9628fe8498bd51c8c3516fa5
+DIST bpftrace-0.19.0.gh.tar.gz 1157739 BLAKE2B ebedebe365621436da7735e373dcb142ddad9c8869b8d1c20b227b8cf772b1005d79cec7eef16f7ef7b9f92b9061751986efe43bd102c7592051a549377161bf SHA512 727e1319e8bcb9b197636c2bd3145c1805e0772e268187a1c71979966f28c81e92347606be383f71f922f56df62afea8ac672d5d40fd0338b3687e0520fa3786
EBUILD bpftrace-0.18.0.ebuild 1835 BLAKE2B edcacb13d714cb04c2e749bbf3cbdd49f790a41f50a10aa4b12efd30875bbaacdc6b7f4a29aff8d9e9df482e6aae376abce85a6d651b4bbdb72004cd6f78e4f1 SHA512 dcf7c7a09aad14258d9868d221a5750309edebbb74c820631feb79bf8ab8cb2f0184010d8993675b0482cedf47fb08ed2fdcfb1613616ab74d38ab033b3d589e
EBUILD bpftrace-0.18.1.ebuild 1835 BLAKE2B dbf82862ccc7a5a1add146ff76206ea83ee1c13da6642c3c25ccdee18509450764587dd4321833d0d906ce712de4ef1b8e7c20b9960af55628140ff6f5baa71f SHA512 067364451649bcc0175f552ab93f9df10a24fed403f317aeeb18b12b42f73f9fe0dc6f15a2f1fb14e8e2c30929637b6540a1c7b9b271e915f97ae72640e26de0
+EBUILD bpftrace-0.19.0.ebuild 1835 BLAKE2B 253985d0e64728ae8476085a6eb61f1be68c108f4b7db7e003e04bc10a4beaa427616b7bc19bf687df36abdce4110dca5283a87fad0de1ddafb9caf906314174 SHA512 1ab2239f4cfe8d9ff9f7ef7528734ca06489edbcab4365f3743c348692988c69ce2b07dcb92fc050630bc3eecfafc17aa05bdf2a92cc77f59313c38a6fac9d61
MISC metadata.xml 499 BLAKE2B ce7c46f4c5e49f2f779ff6584053f7fc78dffaeee432ac46a8881b3d49dc569e309af95aaf9d6e77a36ebc87be0cd2f86a5db7b733463e4252d3a242d914f293 SHA512 dfb827afd47feb8204ef40c940ebcc7d1b3217cdf0f24425e4ab32195309d727225e942d777871565e47a2c02244d053f46ed25165e9728c94e0683ff61bf4ce
diff --git a/dev-util/bpftrace/bpftrace-0.17.1.ebuild b/dev-util/bpftrace/bpftrace-0.19.0.ebuild
index 21b7e21bf0fd..4fa38e3d617a 100644
--- a/dev-util/bpftrace/bpftrace-0.17.1.ebuild
+++ b/dev-util/bpftrace/bpftrace-0.19.0.ebuild
@@ -52,11 +52,9 @@ QA_DT_NEEDED="
"
PATCHES=(
- "${FILESDIR}/bpftrace-0.17.0-install-libs.patch"
+ "${FILESDIR}/bpftrace-0.19.0-install-libs.patch"
"${FILESDIR}/bpftrace-0.15.0-dont-compress-man.patch"
"${FILESDIR}/bpftrace-0.11.4-old-kernels.patch"
- "${FILESDIR}/bpftrace-0.17.0-llvm-16.patch"
- "${FILESDIR}/bpftrace-0.17.0-use-std-optional.patch"
)
pkg_pretend() {
diff --git a/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch b/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch
deleted file mode 100644
index 5d845c134bea..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.17.0-llvm-16.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-
-From: https://github.com/iovisor/bpftrace/pull/2528
-
-From a91064d7fb26626d79719c2e2a13cc2acab9549a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 10 Mar 2023 00:08:27 -0800
-Subject: [PATCH] cmake: Raise max llvm major version to 16
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0a7914f580d..341ac7e9c1f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -165,7 +165,7 @@ else()
- endif()
-
- set(MIN_LLVM_MAJOR 6)
-- set(MAX_LLVM_MAJOR 15)
-+ set(MAX_LLVM_MAJOR 16)
-
- if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR}))
- message(SEND_ERROR "Unsupported LLVM version found via ${LLVM_INCLUDE_DIRS}: ${LLVM_VERSION_MAJOR}")
diff --git a/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch b/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch
deleted file mode 100644
index 21b4b7e6c267..000000000000
--- a/dev-util/bpftrace/files/bpftrace-0.17.0-use-std-optional.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-
-From: https://github.com/iovisor/bpftrace/pull/2525
-
-From a794397394aa836f776da17c8e08876a2f64d477 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Mar 2023 21:30:27 -0700
-Subject: [PATCH] ast: Use std::optional in CodegenLLVM::CodegenLLVM call
-
-Fixes build with clang-16
-
-src/ast/passes/codegen_llvm.cpp:63:53: error: use of undeclared identifier 'Optional'; did you mean 'std::optional'?
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/ast/passes/codegen_llvm.cpp | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/src/ast/passes/codegen_llvm.cpp b/src/ast/passes/codegen_llvm.cpp
-index 616ff89ddbc..fe440adf373 100644
---- a/src/ast/passes/codegen_llvm.cpp
-+++ b/src/ast/passes/codegen_llvm.cpp
-@@ -56,11 +56,17 @@ CodegenLLVM::CodegenLLVM(Node *root, BPFtrace &bpftrace)
- throw std::runtime_error(
- "Could not find bpf llvm target, does your llvm support it?");
-
-- target_machine_.reset(target->createTargetMachine(LLVMTargetTriple,
-- "generic",
-- "",
-- TargetOptions(),
-- Optional<Reloc::Model>()));
-+ target_machine_.reset(
-+ target->createTargetMachine(LLVMTargetTriple,
-+ "generic",
-+ "",
-+ TargetOptions(),
-+#if LLVM_VERSION_MAJOR >= 16
-+ std::optional<Reloc::Model>()
-+#else
-+ Optional<Reloc::Model>()
-+#endif
-+ ));
- target_machine_->setOptLevel(llvm::CodeGenOpt::Aggressive);
-
- module_->setTargetTriple(LLVMTargetTriple);
diff --git a/dev-util/bpftrace/files/bpftrace-0.17.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.19.0-install-libs.patch
index 7c14f8f9416e..647b0cd4cae5 100644
--- a/dev-util/bpftrace/files/bpftrace-0.17.0-install-libs.patch
+++ b/dev-util/bpftrace/files/bpftrace-0.19.0-install-libs.patch
@@ -1,9 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0a7914f5..b9d8f47f 100644
+index a1360a71..24d85abc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -125,9 +125,10 @@ find_package(FLEX REQUIRED)
- bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc VERBOSE)
+@@ -138,9 +138,10 @@ endif()
+ bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS ${BISON_FLAGS} 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})
@@ -17,7 +17,7 @@ index 0a7914f5..b9d8f47f 100644
include(CheckSymbolExists)
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt
-index a95c60a1..f5c4d676 100644
+index c12f9567..0bfec98c 100644
--- a/resources/CMakeLists.txt
+++ b/resources/CMakeLists.txt
@@ -1,6 +1,7 @@
@@ -31,7 +31,7 @@ index a95c60a1..f5c4d676 100644
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 ce16469a..98161980 100644
+index 401ddc0a..05f0f637 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,7 +13,7 @@ else()
@@ -43,7 +43,7 @@ index ce16469a..98161980 100644
attached_probe.cpp
bpffeature.cpp
bpftrace.cpp
-@@ -43,7 +43,7 @@ add_library(runtime
+@@ -44,7 +44,7 @@ add_library(runtime
${BFD_DISASM_SRC}
)
# Ensure flex+bison outputs are built first
@@ -52,7 +52,7 @@ index ce16469a..98161980 100644
add_library(libbpftrace
build_info.cpp
-@@ -60,6 +60,7 @@ add_executable(${BPFTRACE}
+@@ -61,6 +61,7 @@ add_executable(${BPFTRACE}
)
install(TARGETS ${BPFTRACE} DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -60,7 +60,7 @@ index ce16469a..98161980 100644
target_link_libraries(${BPFTRACE} libbpftrace)
if (BUILD_FUZZ)
-@@ -88,7 +89,7 @@ endif()
+@@ -89,7 +90,7 @@ endif()
set(KERNEL_HEADERS_DIR "" CACHE PATH "Hard-code kernel headers directory")
if (KERNEL_HEADERS_DIR)
MESSAGE(STATUS "Using KERNEL_HEADERS_DIR=${KERNEL_HEADERS_DIR}")
@@ -69,7 +69,7 @@ index ce16469a..98161980 100644
endif()
execute_process(
-@@ -108,10 +109,11 @@ endif()
+@@ -109,10 +110,11 @@ endif()
add_definitions("-DBPFTRACE_VERSION=\"${BPFTRACE_VERSION}\"")
@@ -85,19 +85,19 @@ index ce16469a..98161980 100644
target_compile_definitions(libbpftrace PRIVATE ${BPFTRACE_FLAGS})
# Linking
-@@ -124,8 +126,8 @@ if(STATIC_LINKING)
+@@ -125,8 +127,8 @@ if(STATIC_LINKING)
endif(STATIC_LINKING)
--target_link_libraries(runtime ${LIBBPF_LIBRARIES})
+-target_link_libraries(runtime ${LIBBPF_LIBRARIES} ${ZLIB_LIBRARIES})
-target_link_libraries(libbpftrace parser resources runtime aot ast arch cxxdemangler_llvm)
-+target_link_libraries(bpftraceruntime ${LIBBPF_LIBRARIES})
++target_link_libraries(bpftraceruntime ${LIBBPF_LIBRARIES} ${ZLIB_LIBRARIES})
+target_link_libraries(libbpftrace bpftraceparser bpftraceresources bpftraceruntime aot bpftraceast bpftracearch cxxdemangler_llvm)
if(LIBPCAP_FOUND)
target_link_libraries(libbpftrace ${LIBPCAP_LIBRARIES})
-@@ -135,37 +137,38 @@ if(HAVE_BFD_DISASM)
- if(STATIC_LINKING)
+@@ -136,49 +138,49 @@ if(HAVE_BFD_DISASM)
+ if(STATIC_LINKING OR LIBBFD_STATIC)
add_library(LIBBFD STATIC IMPORTED)
set_property(TARGET LIBBFD PROPERTY IMPORTED_LOCATION ${LIBBFD_LIBRARIES})
- target_link_libraries(runtime LIBBFD)
@@ -110,12 +110,26 @@ index ce16469a..98161980 100644
set_property(TARGET LIBIBERTY PROPERTY IMPORTED_LOCATION ${LIBIBERTY_LIBRARIES})
- target_link_libraries(runtime LIBIBERTY)
+ target_link_libraries(bpftraceruntime LIBIBERTY)
+
+ add_library(LIBZSTD STATIC IMPORTED)
+ if (LIBZSTD_FOUND)
+ set_property(TARGET LIBZSTD PROPERTY IMPORTED_LOCATION ${LIBZSTD_LIBRARIES})
+- target_link_libraries(runtime LIBZSTD)
++ target_link_libraries(bpftraceruntime LIBZSTD)
+ endif(LIBZSTD_FOUND)
+
+ add_library(LIBSFRAME STATIC IMPORTED)
+ if (LIBSFRAME_FOUND)
+ set_property(TARGET LIBSFRAME PROPERTY IMPORTED_LOCATION ${LIBSFRAME_LIBRARIES})
+- target_link_libraries(runtime LIBSFRAME)
++ target_link_libraries(bpftraceruntime LIBSFRAME)
+ endif()
else()
- target_link_libraries(runtime ${LIBBFD_LIBRARIES})
- target_link_libraries(runtime ${LIBOPCODES_LIBRARIES})
+ target_link_libraries(bpftraceruntime ${LIBBFD_LIBRARIES})
+ target_link_libraries(bpftraceruntime ${LIBOPCODES_LIBRARIES})
- endif(STATIC_LINKING)
+ endif(STATIC_LINKING OR LIBBFD_STATIC)
endif(HAVE_BFD_DISASM)
# Link to bcc libraries (without LLVM) if possible
@@ -139,7 +153,6 @@ index ce16469a..98161980 100644
add_library(LIBELF STATIC IMPORTED)
set_property(TARGET LIBELF PROPERTY IMPORTED_LOCATION ${LIBELF_LIBRARIES})
- target_link_libraries(runtime LIBELF)
-+ set_property(TARGET LIBELF PROPERTY IMPORTED_LOCATION ${LIBBPF_LIBRARIES})
+ target_link_libraries(bpftraceruntime LIBELF)
else()
- target_link_libraries(runtime ${LIBELF_LIBRARIES})
@@ -147,9 +160,9 @@ index ce16469a..98161980 100644
endif(STATIC_BPF_BCC)
if (LIBDW_FOUND)
-@@ -182,16 +185,16 @@ if (LIBDW_FOUND)
- set_property(TARGET LIBDW PROPERTY IMPORTED_LOCATION ${LIBDW_LIBRARIES})
- target_link_libraries(LIBDW INTERFACE LIBBZ2 LIBELF LIBLZMA)
+@@ -207,16 +209,16 @@ if (LIBDW_FOUND)
+
+ target_link_libraries(LIBDW INTERFACE ${LIBDW_LIBS})
- target_link_libraries(runtime LIBDW)
+ target_link_libraries(bpftraceruntime LIBDW)
@@ -167,7 +180,7 @@ index ce16469a..98161980 100644
target_link_libraries(libbpftrace "stdc++fs")
endif()
-@@ -213,16 +216,16 @@ endif()
+@@ -238,16 +240,16 @@ endif()
if (STATIC_LINKING)
if(ANDROID)
target_link_libraries(libbpftrace "-Wl,-Bdynamic" "-ldl" "-lm" "-lz")
@@ -177,14 +190,14 @@ index ce16469a..98161980 100644
target_link_libraries(libbpftrace "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm")
target_link_libraries(libbpftrace "-Wl,-Bstatic" "-lz")
- target_link_libraries(runtime "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm")
-- target_link_libraries(runtime "-Wl,-Bstatic" "-lz")
+- target_link_libraries(runtime "-Wl,-Bstatic" "-lz")
+ target_link_libraries(bpftraceruntime "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm")
+ target_link_libraries(bpftraceruntime "-Wl,-Bstatic" "-lz")
endif()
elseif(STATIC_BPF_BCC)
- # partial static build, libbpf needs zlib
-- target_link_libraries(runtime "-lz")
-+ target_link_libraries(bpftraceruntime "-lz")
+ # partial static build, libbpf needs zlib, bcc needs liblzma
+- target_link_libraries(runtime "-lz" "-llzma")
++ target_link_libraries(bpftraceruntime "-lz" "-llzma")
endif()
unset(MAIN_SRC)
@@ -213,14 +226,11 @@ index c776d204..41e84317 100644
if(LIBPCAP_FOUND)
diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt
-index d01d1ea3..82bfeccc 100644
+index e6a1d0a0..c53daa19 100644
--- a/src/arch/CMakeLists.txt
+++ b/src/arch/CMakeLists.txt
-@@ -1,21 +1,23 @@
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
-- add_library(arch aarch64.cpp)
-+ add_library(bpftracearch aarch64.cpp)
- elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a")
+@@ -1,19 +1,20 @@
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64)")
- add_library(arch arm.cpp)
+ add_library(bpftracearch arm.cpp)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR
@@ -246,7 +256,6 @@ index d01d1ea3..82bfeccc 100644
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 c390ea6a..37019bd9 100644