diff options
Diffstat (limited to 'dev-util/bpftrace')
-rw-r--r-- | dev-util/bpftrace/Manifest | 15 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.11.0-r1.ebuild (renamed from dev-util/bpftrace/bpftrace-0.9.4.ebuild) | 35 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.9.2.ebuild | 68 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.9.3.ebuild | 68 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-9999.ebuild | 47 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch | 115 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch (renamed from dev-util/bpftrace/files/bpftrace-0.9.4-install-libs.patch) | 49 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.9.3-install-libs.patch | 129 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.9.4-llvm-10.patch | 144 |
9 files changed, 91 insertions, 579 deletions
diff --git a/dev-util/bpftrace/Manifest b/dev-util/bpftrace/Manifest index 83cabc6415ce..7dfedaa644f3 100644 --- a/dev-util/bpftrace/Manifest +++ b/dev-util/bpftrace/Manifest @@ -2,18 +2,11 @@ AUX bpftrace-0.10.0-dont-compress-man.patch 722 BLAKE2B 583969e9f4457a49f17f33d9 AUX bpftrace-0.10.0-install-libs.patch 5790 BLAKE2B 93f12b430f8ba5772423fc0350c59d0f43b9de05fbbc03c4ef46c113886b74a330c397122daa6a423f4a6111b1d113679503b06d7e507f23a837dc06a4c662ca SHA512 585b1128e1a7d4cb92a38eb4043ff824179aed5767f9884d54714dbcc5148d95ca1e95b1fadbde520f57be60501d850c217204f7aed1c556ea5924e422c661bd AUX bpftrace-0.10.0-llvm-multi.patch 2516 BLAKE2B 354882237ce984c776ae8f4c0c442a3f250b007d11a03d3bc794c69df9405d67ee09e0ae86ff2585ea025e941a246904e80556857e531c1f3fc06befba88c7da SHA512 5a5d6db61da9c1d07991500ab7feeb5aa945d11dc2f6387d7ccb04ff6a07da478d9a1005a79bba8ad04805eadca95fc72ffc3cc1ffc4bca76ea66f08ea56e2a8 AUX bpftrace-0.10.0-no-bpf_detach_kfunc.patch 379 BLAKE2B cb796b682fa5b4a89d4f7e879e23d7b1fd3a8202b87467dec8cb3abb0b80edaa3b3353bfd56277d2a087541576a0066526110266b961ae36c57c833cb38c46b1 SHA512 be47a1f688f71c49d249a4ce1292e705f0cc5fb0ec73b77c976cde896325cd65423fba9999a5fba2d027230da02c8a8ebc5d2d73f22e46d53b42ae9528a8724d -AUX bpftrace-0.10_pre20190614-install-libs.patch 4653 BLAKE2B 66229e4b3f7edc345eeac5f833348f7a434ee7f6c830c344b3c357fafec98b8cc8c725cf37ee01802d085cdbf9deb0fa13d9dd72161b230aff589c75b17890a3 SHA512 63f899bd119f86ee6e9bae0c2ef6e657a37a33c700414ea4757353f0637e89ef9ed3dbf1b70414eec1a5c2658451e8be3e7de1941a0796cac621361bcdd14537 -AUX bpftrace-0.9.3-install-libs.patch 5117 BLAKE2B 6cad778dd19ab040f3bd88390329cc49261c83dcc0ff97f9e663d5fb0d55da87d0e4c1efaabbd31b11e383ea0f904fdab8bd7f34fbdd0805abe20d623673c1fc SHA512 0842712b8d32ba4f7bc0767e3748ed4e8517187c9c75d426e1946aacce3a46fd5f7100d4cef0bed655a763d102cfeff160d549065f6b9c6000a7b3f496cb8b87 -AUX bpftrace-0.9.4-install-libs.patch 5481 BLAKE2B 96df784e95fc42e385dc3330d0ea074863a8ba3c3aeb8d7078b29e03708b2e46fccc30f097dbf2c347f0fb4afadee0d2b7cbb038b05a2d81fbd66e4e008302dc SHA512 e74994b020939035fb9a9b646f5572ae3f241f194e7f119c771d5391a651f27ab0733364a4ddcccd7759f5951141e61c4bf019f98a62a820577687109ca50854 -AUX bpftrace-0.9.4-llvm-10.patch 7123 BLAKE2B 61fe740aae135de1c039e73b3c4e8bd79a8a7412c3d06ad7a8ab3d8d3c0ec825053b4e6b1fcd208a7847cf8f0ff8436ed988aa403485f90755c0e59d5c2a5c8c SHA512 eaba150ea6dafb9e7ab13f1f23246ce064241369882b16bf7eb3a9dc74545064c604e4435c6567c6f0a0df9ac939120c5b3ac5ee95bdc669f9d0e82ededc9c95 +AUX bpftrace-0.11.0-install-libs.patch 6063 BLAKE2B c05146ef6d6ffd7fb5e1f97a9ea3dbdbab1b875bcf1707b07ff8c2b93e0e8cd36093330edc32b1d25796a5b72370b114301c1c0db78bc59c48740158e31a8e95 SHA512 e022425af1d19e1ff586f23d7de384b912bf8b67e501b86d31e3450e118ea3266cb81413caa06b3e674a31df2585ad447234e3897c716f055c7423a5f7333a66 AUX bpftrace-mandir.patch 906 BLAKE2B d875e2523b7e719624d92c58a8f058cdd597da07bf6472d2e3dc05eb46be64718ed4056e15a93e4c22264fa35ceb6b79b428febade422ba435a2a2b9e17fb707 SHA512 11544e9e5892ae3657ff903fa2780e71223e380322b4059ddcea4a6edd80c5a7ab8d45188eb577127f64a6705a6ae41d53f3ba7e05bf450853b12a9ba3d84904 DIST bpftrace-0.10.0.tar.gz 835854 BLAKE2B 623369bb2a2ad8d5eec364afa98bdae3fbe5e66182d8f1187fe86a8bd70ee357a554eb063fdbe5476eab23912adf2cf027092cac3e6989d8f716e91aa5d01212 SHA512 da400efe78cea505a32deead594b047ec4394d3eefe86e7b6853fe2dc715c5847a3abcbd26c1fac39d0a534f1e57d6c0bc3625e0c3f1054b0d84b7b1d6eb69b9 -DIST bpftrace-0.9.2.tar.gz 715019 BLAKE2B 1f20998bd379b91cb46d7e856a5d892e0de7ad6d9f85cb657fcf6a0c879167c0931d28c78e4be98adab349144fe0bc99871cf70556dd1998e5b8f918fa1702e3 SHA512 5c6ee5fec690a907c370ed0bed85906d304215d7f97b99a2cae90453061f522fa6369627c9524a5a24e97c6cbb595a880a2a1b1d71095fffb693a4cef172a6f0 -DIST bpftrace-0.9.3.tar.gz 743506 BLAKE2B d00708bcebaf7f039788dfc52f4a0bb501bb3c52e8b789060f824652b3917ea3950d77dbc7bee04da013f4b552338251bda9781d19a03ec227208b943fded232 SHA512 49b12735fe2fbf4f72d3d0c0372a7a570c7abc92d1f626624d591a863009c8bfabdf86825f133885800c7ea293773651be66e4c792f9cd397f82d250a7af83be -DIST bpftrace-0.9.4.tar.gz 792253 BLAKE2B d34d390a612825141b86ba14482f06820c88bea76580c53c17d19a6480c0e2a5656531f39b79fbcea4e004ecd3eea36877560f22fac584f36a3dffa1e7fe96c5 SHA512 d2b32235fa81d6f06771df32877388a9105230adfc638b0d0ebf4f11a567246e8514d93c14da9c7008dbacd6b2c4108604fc5a2721ef831efa5c596cbe50b1da +DIST bpftrace-0.11.0.tar.gz 867444 BLAKE2B a99255befadea0b4cb54299a8318c0a7a667ac2258b612750705b4d351ac59f4411f2567bc0100929291e3c9756d276671e41af9d398b118b3d486dace2953d7 SHA512 32bf0c23a7b0e1a57d0e0b8fc845a9e184e201ac3f6018a3d3cee8c97096093b333578cb898ede02fb3ab8d55ba9bcd2bb67ac70b81a49461c0f6e5c03c2a6f5 EBUILD bpftrace-0.10.0-r1.ebuild 1676 BLAKE2B 57af40bbdefcc28fc775f7aadeb2d7213b974b130aa51591076354f1f351ecace66d9c1355c99adab7f5cdcf2e711767d1f045f6e076eef2476055d7a0309bd2 SHA512 42b1eefa65583294af9baf692dcd9d8da5577b4e59cdb202b5d0df25e7746acafeac9888ee2c7eac8bff8974edaf4407c9d07e62e47662a02743fc0de0fbc9e5 -EBUILD bpftrace-0.9.2.ebuild 1402 BLAKE2B 539e79098fd31d8ade5449f53e9b63d4c8b3ecd3e2716eab76f8a7eab00e11480224502369899f68eb839c9cb48cebc1f5fd6d6c231f93a4a16d58e19e973171 SHA512 9021699f98686a48954e39d653797b10d68cc56b284bdc77a58778dec41c20617031b1ccf8e15283a6b630b366856f6ec0d1013c6150709cc37f25d786f289db -EBUILD bpftrace-0.9.3.ebuild 1391 BLAKE2B db3f13374aeac65bc6bbaccc6ae187c6f601c753d7b426562dad7af055c1c4a32965abd1a4d8100eddf96cc6b5cac8c1d839cbc4c9cd2ba4822f83c23bcb6c2c SHA512 1fc37e191621ba5c63d43e55f772b505eddff423f37d3697061a4a03000a5bbc8086cb5e4df87c98d080317213581058128b4a5a40c807e5034e6786ca8d37ee -EBUILD bpftrace-0.9.4.ebuild 1487 BLAKE2B 1003d7865410fb246ac9aa58adafa018e3979a331543dffd7fdce772517875043f6602d7d2856aecf7eb76094d7bf6531f9cbd5e3f296c98f8e0e55178c069b7 SHA512 e122a7c9ab7db361447eb3a7ce79b416ede14b0eebe5ea0b507344fd4203f9e0cf9c9375f526494c4ec1f5c4bafc3153a97dc6bc8554001aac3e609f0f7b233e -EBUILD bpftrace-9999.ebuild 1339 BLAKE2B 89932b8689799d37f5730662705d644059796e27abbb187e57f741450dbf1034d5322f3e94a4a493f0341f939fcc3902e3173d8b2357c70695c3f3dd957d7db5 SHA512 b7df8cb8af0c74599fb87a32ff1efff499e3559682c72fea78ea5d53e9513f0738fff86acbc91c54b21e3b20ba0e0ccea8f559e7d80f359e45e8448a7fa94000 +EBUILD bpftrace-0.11.0-r1.ebuild 1538 BLAKE2B 7bc25c0281e1e50bf22933c32cb16802a521ea9633e003ca1c6487542ea8ac6f101e932a9c1e163c9f42936c1ef7115f143212aa9275ef0d57187117f2474602 SHA512 0be111921a92d1e6b7c17aa59842a9d06ab6478fd6b86aab7c232b19978541ee3e9b3d5adbefaf57f26272c0276c9ed5dcac53beeb34cdc07cdd7440a4d258d8 +EBUILD bpftrace-9999.ebuild 1538 BLAKE2B 7bc25c0281e1e50bf22933c32cb16802a521ea9633e003ca1c6487542ea8ac6f101e932a9c1e163c9f42936c1ef7115f143212aa9275ef0d57187117f2474602 SHA512 0be111921a92d1e6b7c17aa59842a9d06ab6478fd6b86aab7c232b19978541ee3e9b3d5adbefaf57f26272c0276c9ed5dcac53beeb34cdc07cdd7440a4d258d8 MISC metadata.xml 308 BLAKE2B 5440fafa478bdbdf6906c74d697a9542deb8b13b76527a380df723562759d914d597dff029f93ba4567ce4e0f4723fded5a13ea7d2032752253bad1906e753dc SHA512 c27c2ef4795e9167ea133e0c0e2c6d67425d6db754bd563d9cb7a791b4a155ebe855ad0e67c2b29235a9b9761f29dbb14958b124c95a1aaddb97801c763914ba diff --git a/dev-util/bpftrace/bpftrace-0.9.4.ebuild b/dev-util/bpftrace/bpftrace-0.11.0-r1.ebuild index ad25d1221e13..6eeeb6c28d67 100644 --- a/dev-util/bpftrace/bpftrace-0.9.4.ebuild +++ b/dev-util/bpftrace/bpftrace-0.11.0-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit toolchain-funcs linux-info cmake-utils +inherit toolchain-funcs llvm linux-info cmake DESCRIPTION="High-level tracing language for eBPF" HOMEPAGE="https://github.com/iovisor/bpftrace" @@ -23,26 +23,31 @@ LICENSE="Apache-2.0" SLOT="0" IUSE="test" -COMMON_DEPEND="dev-util/systemtap +COMMON_DEPEND=" + dev-util/systemtap sys-devel/clang:= dev-libs/libbpf:= >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] - >=dev-util/bcc-0.12.0:= - virtual/libelf" + sys-devel/clang:= + >=dev-util/bcc-0.13.0:= + virtual/libelf +" DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest )" + test? ( dev-cpp/gtest ) +" RDEPEND="${COMMON_DEPEND}" -BDEPEND+="dev-util/cmake +BDEPEND+=" + >=dev-util/cmake-3.8 sys-devel/flex - sys-devel/bison" + sys-devel/bison +" -S="${WORKDIR}/${PN}-${MY_PV}" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" PATCHES=( - "${FILESDIR}/bpftrace-0.9.4-llvm-10.patch" - "${FILESDIR}/bpftrace-0.9.4-install-libs.patch" - "${FILESDIR}/bpftrace-mandir.patch" + "${FILESDIR}/bpftrace-0.11.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.10.0-dont-compress-man.patch" ) # lots of fixing needed @@ -61,8 +66,12 @@ pkg_pretend() { check_extra_config } +pkg_setup() { + LLVM_MAX_SLOT=11 llvm_pkg_setup +} + src_prepare() { - cmake-utils_src_prepare + cmake_src_prepare } src_configure() { @@ -72,5 +81,5 @@ src_configure() { "-DBUILD_TESTING:BOOL=OFF" ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-util/bpftrace/bpftrace-0.9.2.ebuild b/dev-util/bpftrace/bpftrace-0.9.2.ebuild deleted file mode 100644 index 5fcb41040f5d..000000000000 --- a/dev-util/bpftrace/bpftrace-0.9.2.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs linux-info cmake-utils - -DESCRIPTION="High-level tracing language for eBPF" -HOMEPAGE="https://github.com/iovisor/bpftrace" - -if [[ ${PV} =~ 9{4,} ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/iovisor/${PN}" - BDEPEND="" -else - MY_PV="${PV//_/}" - SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" - BDEPEND="app-arch/xz-utils " -fi - -LICENSE="Apache-2.0" -SLOT="0" -IUSE="test" - -COMMON_DEPEND="dev-util/systemtap - sys-devel/clang:= - dev-libs/libbpf:= - >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] - >=dev-util/bcc-0.10.0:= - virtual/libelf" -DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest )" -RDEPEND="${COMMON_DEPEND}" -BDEPEND+="dev-util/cmake - sys-devel/flex - sys-devel/bison" - -S="${WORKDIR}/${PN}-${MY_PV}" -QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" - -PATCHES=( - "${FILESDIR}/bpftrace-0.10_pre20190614-install-libs.patch" - "${FILESDIR}/bpftrace-mandir.patch" -) - -# lots of fixing needed -RESTRICT="test" - -pkg_pretend() { - local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~BPF_JIT ~BPF_EVENTS" - - check_extra_config -} - -src_prepare() { - cmake-utils_src_prepare -} - -src_configure() { - local -a mycmakeargs - mycmakeargs=( - "-DSTATIC_LINKING:BOOL=OFF" - "-DBUILD_TESTING:BOOL=OFF" - ) - - cmake-utils_src_configure -} diff --git a/dev-util/bpftrace/bpftrace-0.9.3.ebuild b/dev-util/bpftrace/bpftrace-0.9.3.ebuild deleted file mode 100644 index 74f1dd849d2c..000000000000 --- a/dev-util/bpftrace/bpftrace-0.9.3.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs linux-info cmake-utils - -DESCRIPTION="High-level tracing language for eBPF" -HOMEPAGE="https://github.com/iovisor/bpftrace" - -if [[ ${PV} =~ 9{4,} ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/iovisor/${PN}" - BDEPEND="" -else - MY_PV="${PV//_/}" - SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" - BDEPEND="app-arch/xz-utils " -fi - -LICENSE="Apache-2.0" -SLOT="0" -IUSE="test" - -COMMON_DEPEND="dev-util/systemtap - sys-devel/clang:= - dev-libs/libbpf:= - >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] - >=dev-util/bcc-0.10.0:= - virtual/libelf" -DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest )" -RDEPEND="${COMMON_DEPEND}" -BDEPEND+="dev-util/cmake - sys-devel/flex - sys-devel/bison" - -S="${WORKDIR}/${PN}-${MY_PV}" -QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" - -PATCHES=( - "${FILESDIR}/bpftrace-0.9.3-install-libs.patch" - "${FILESDIR}/bpftrace-mandir.patch" -) - -# lots of fixing needed -RESTRICT="test" - -pkg_pretend() { - local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~BPF_JIT ~BPF_EVENTS" - - check_extra_config -} - -src_prepare() { - cmake-utils_src_prepare -} - -src_configure() { - local -a mycmakeargs - mycmakeargs=( - "-DSTATIC_LINKING:BOOL=OFF" - "-DBUILD_TESTING:BOOL=OFF" - ) - - cmake-utils_src_configure -} diff --git a/dev-util/bpftrace/bpftrace-9999.ebuild b/dev-util/bpftrace/bpftrace-9999.ebuild index ccad41e9941b..6eeeb6c28d67 100644 --- a/dev-util/bpftrace/bpftrace-9999.ebuild +++ b/dev-util/bpftrace/bpftrace-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 2019 Gentoo Authors +# Copyright 2019-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs linux-info cmake-utils +inherit toolchain-funcs llvm linux-info cmake DESCRIPTION="High-level tracing language for eBPF" HOMEPAGE="https://github.com/iovisor/bpftrace" @@ -13,7 +13,8 @@ if [[ ${PV} =~ 9{4,} ]]; then EGIT_REPO_URI="https://github.com/iovisor/${PN}" BDEPEND="" else - SRC_URI="https://github.com/iovisor/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + MY_PV="${PV//_/}" + SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm64 ~x86" BDEPEND="app-arch/xz-utils " fi @@ -22,37 +23,55 @@ LICENSE="Apache-2.0" SLOT="0" IUSE="test" -COMMON_DEPEND="dev-util/systemtap +COMMON_DEPEND=" + dev-util/systemtap sys-devel/clang:= dev-libs/libbpf:= >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] - >=dev-util/bcc-0.10.0:= - virtual/libelf" + sys-devel/clang:= + >=dev-util/bcc-0.13.0:= + virtual/libelf +" DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest )" + test? ( dev-cpp/gtest ) +" RDEPEND="${COMMON_DEPEND}" -BDEPEND+="dev-util/cmake +BDEPEND+=" + >=dev-util/cmake-3.8 sys-devel/flex - sys-devel/bison" + sys-devel/bison +" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" PATCHES=( - "${FILESDIR}/bpftrace-0.9.3-install-libs.patch" - "${FILESDIR}/bpftrace-mandir.patch" + "${FILESDIR}/bpftrace-0.11.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.10.0-dont-compress-man.patch" ) # lots of fixing needed RESTRICT="test" pkg_pretend() { - local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~BPF_JIT ~BPF_EVENTS" + local CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~FTRACE_SYSCALLS + ~HAVE_EBPF_JIT + " check_extra_config } +pkg_setup() { + LLVM_MAX_SLOT=11 llvm_pkg_setup +} + src_prepare() { - cmake-utils_src_prepare + cmake_src_prepare } src_configure() { @@ -62,5 +81,5 @@ src_configure() { "-DBUILD_TESTING:BOOL=OFF" ) - cmake-utils_src_configure + cmake_src_configure } 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 deleted file mode 100644 index f4483570c996..000000000000 --- a/dev-util/bpftrace/files/bpftrace-0.10_pre20190614-install-libs.patch +++ /dev/null @@ -1,115 +0,0 @@ -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() diff --git a/dev-util/bpftrace/files/bpftrace-0.9.4-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch index fe3fc29fd9b4..a28e37564eae 100644 --- a/dev-util/bpftrace/files/bpftrace-0.9.4-install-libs.patch +++ b/dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2b214c1..a787d7d 100644 +index 1bca8d6..1482b29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -85,9 +85,10 @@ find_package(FLEX REQUIRED) +@@ -91,9 +91,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) @@ -31,10 +31,10 @@ index a95c60a..f5c4d67 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 5b9a95d..b1ccf7a 100644 +index 487fa9b..61b7b38 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -68,7 +68,8 @@ if (ALLOW_UNSAFE_PROBE) +@@ -84,7 +84,8 @@ if (ALLOW_UNSAFE_PROBE) target_compile_definitions(bpftrace PRIVATE HAVE_UNSAFE_PROBE) endif(ALLOW_UNSAFE_PROBE) @@ -42,13 +42,13 @@ index 5b9a95d..b1ccf7a 100644 +target_link_libraries(bpftrace bpftracearch bpftraceast bpftraceparser + bpftraceresources) + target_link_libraries(bpftrace ${LIBBCC_LIBRARIES}) if(STATIC_LINKING) - target_link_libraries(bpftrace ${LIBBCC_LIBRARIES}) diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt -index edb0654..e57c8c5 100644 +index a26c1c8..ffb5900 100644 --- a/src/arch/CMakeLists.txt +++ b/src/arch/CMakeLists.txt -@@ -1,8 +1,10 @@ +@@ -1,13 +1,15 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - add_library(arch aarch64.cpp) + add_library(bpftracearch aarch64.cpp) @@ -56,25 +56,33 @@ index edb0654..e57c8c5 100644 CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") - add_library(arch ppc64.cpp) + add_library(bpftracearch ppc64.cpp) - else() + 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) + 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 f280f47..5db9246 100644 +index 649bf0a..b969b9c 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 - field_analyser.cpp -@@ -7,12 +7,13 @@ add_library(ast +@@ -7,17 +7,18 @@ add_library(ast + printer.cpp semantic_analyser.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) @@ -85,13 +93,17 @@ index f280f47..5db9246 100644 +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) -+install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) if (STATIC_LINKING) set(clang_libs -@@ -36,26 +37,26 @@ if (STATIC_LINKING) +@@ -41,17 +42,17 @@ if (STATIC_LINKING) if(EMBED_LIBCLANG_ONLY) unlink_transitive_dependency("${CLANG_EXPORTED_TARGETS}" "LLVM") endif() @@ -105,12 +117,15 @@ index f280f47..5db9246 100644 - target_link_libraries(ast ${LLVM_EMBEDDED_CMAKE_TARGETS}) + target_link_libraries(bpftraceast ${LLVM_EMBEDDED_CMAKE_TARGETS}) else() - llvm_map_components_to_libnames(llvm_libs bpfcodegen ipo irreader mcjit orcjit ${LLVM_TARGETS_TO_BUILD}) + llvm_map_components_to_libnames(llvm_libs bpfcodegen ipo irreader mcjit option 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}) endif() + + if(STATIC_LIBC) +@@ -60,11 +61,11 @@ if (STATIC_LINKING) else() find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS}) if(found_LLVM) @@ -126,10 +141,10 @@ index f280f47..5db9246 100644 + target_link_libraries(bpftraceast libclang) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 211c47b..2fb73ef 100644 +index 4104a57..59486de 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt -@@ -88,7 +88,8 @@ if(HAVE_BFD_DISASM) +@@ -101,7 +101,8 @@ if(HAVE_BFD_DISASM) endif(STATIC_LINKING) endif(HAVE_BFD_DISASM) @@ -137,5 +152,5 @@ index 211c47b..2fb73ef 100644 +target_link_libraries(bpftrace_test bpftracearch bpftraceast bpftraceparser + bpftraceresources) + target_link_libraries(bpftrace_test ${LIBBCC_LIBRARIES}) if (STATIC_LINKING) - if(EMBED_LLVM OR EMBED_CLANG) diff --git a/dev-util/bpftrace/files/bpftrace-0.9.3-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.9.3-install-libs.patch deleted file mode 100644 index 0ddb07b47408..000000000000 --- a/dev-util/bpftrace/files/bpftrace-0.9.3-install-libs.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5e0d770..d51edf6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -51,9 +51,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 65f3a34..b001a83 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -56,7 +56,8 @@ if (ALLOW_UNSAFE_UPROBE) - target_compile_definitions(bpftrace PRIVATE HAVE_UNSAFE_UPROBE) - endif(ALLOW_UNSAFE_UPROBE) - --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() -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 2d18277..f66a8b7 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -76,7 +76,8 @@ if(HAVE_BFD_DISASM) - target_link_libraries(bpftrace_test ${LIBOPCODES_LIBRARIES}) - endif(HAVE_BFD_DISASM) - --target_link_libraries(bpftrace_test arch ast parser resources) -+target_link_libraries(bpftrace_test bpftracearch bpftraceast bpftraceparser -+ bpftraceresources) - - if (STATIC_LINKING) - target_link_libraries(bpftrace_test ${LIBBCC_LIBRARIES}) diff --git a/dev-util/bpftrace/files/bpftrace-0.9.4-llvm-10.patch b/dev-util/bpftrace/files/bpftrace-0.9.4-llvm-10.patch deleted file mode 100644 index c2131cbbc306..000000000000 --- a/dev-util/bpftrace/files/bpftrace-0.9.4-llvm-10.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff --git a/src/ast/codegen_llvm.cpp b/src/ast/codegen_llvm.cpp -index f81906c..bcc2c7d 100644 ---- a/src/ast/codegen_llvm.cpp -+++ b/src/ast/codegen_llvm.cpp -@@ -41,7 +41,7 @@ void CodegenLLVM::visit(PositionalParameter ¶m) - { - Constant *const_str = ConstantDataArray::getString(module_->getContext(), pstr, true); - AllocaInst *buf = b_.CreateAllocaBPF(ArrayType::get(b_.getInt8Ty(), pstr.length() + 1), "str"); -- b_.CreateMemSet(buf, b_.getInt8(0), pstr.length() + 1, 1); -+ b_.CREATE_MEMSET(buf, b_.getInt8(0), pstr.length() + 1, 1); - b_.CreateStore(const_str, buf); - expr_ = buf; - } -@@ -156,7 +156,7 @@ void CodegenLLVM::visit(Builtin &builtin) - { - AllocaInst *buf = b_.CreateAllocaBPF(builtin.type, "comm"); - // initializing memory needed for older kernels: -- b_.CreateMemSet(buf, b_.getInt8(0), builtin.type.size, 1); -+ b_.CREATE_MEMSET(buf, b_.getInt8(0), builtin.type.size, 1); - b_.CreateGetCurrentComm(buf, builtin.type.size); - expr_ = buf; - } -@@ -189,7 +189,7 @@ void CodegenLLVM::visit(Builtin &builtin) - if (builtin.type.type == Type::usym) - { - AllocaInst *buf = b_.CreateAllocaBPF(builtin.type, "func"); -- b_.CreateMemSet(buf, b_.getInt8(0), builtin.type.size, 1); -+ b_.CREATE_MEMSET(buf, b_.getInt8(0), builtin.type.size, 1); - Value *pid = b_.CreateLShr(b_.CreateGetPidTgid(), 32); - Value *addr_offset = b_.CreateGEP(buf, b_.getInt64(0)); - Value *pid_offset = b_.CreateGEP(buf, {b_.getInt64(0), b_.getInt64(8)}); -@@ -444,7 +444,7 @@ void CodegenLLVM::visit(Call &call) - else if (call.func == "str") - { - AllocaInst *strlen = b_.CreateAllocaBPF(b_.getInt64Ty(), "strlen"); -- b_.CreateMemSet(strlen, b_.getInt8(0), sizeof(uint64_t), 1); -+ b_.CREATE_MEMSET(strlen, b_.getInt8(0), sizeof(uint64_t), 1); - if (call.vargs->size() > 1) { - call.vargs->at(1)->accept(*this); - Value *proposed_strlen = b_.CreateAdd(expr_, b_.getInt64(1)); // add 1 to accommodate probe_read_str's null byte -@@ -462,7 +462,7 @@ void CodegenLLVM::visit(Call &call) - b_.CreateStore(b_.getInt64(bpftrace_.strlen_), strlen); - } - AllocaInst *buf = b_.CreateAllocaBPF(bpftrace_.strlen_, "str"); -- b_.CreateMemSet(buf, b_.getInt8(0), bpftrace_.strlen_, 1); -+ b_.CREATE_MEMSET(buf, b_.getInt8(0), bpftrace_.strlen_, 1); - call.vargs->front()->accept(*this); - b_.CreateProbeReadStr(buf, b_.CreateLoad(strlen), expr_); - b_.CreateLifetimeEnd(strlen); -@@ -541,7 +541,7 @@ void CodegenLLVM::visit(Call &call) - { - // store uint64_t[2] with: [0]: (uint64_t)addr, [1]: (uint64_t)pid - AllocaInst *buf = b_.CreateAllocaBPF(call.type, "usym"); -- b_.CreateMemSet(buf, b_.getInt8(0), call.type.size, 1); -+ b_.CREATE_MEMSET(buf, b_.getInt8(0), call.type.size, 1); - Value *pid = b_.CreateLShr(b_.CreateGetPidTgid(), 32); - Value *addr_offset = b_.CreateGEP(buf, b_.getInt64(0)); - Value *pid_offset = b_.CreateGEP(buf, {b_.getInt64(0), b_.getInt64(8)}); -@@ -592,7 +592,7 @@ void CodegenLLVM::visit(Call &call) - b_.CreateStore(af_type, af_offset); - - Value *inet_offset = b_.CreateGEP(buf, {b_.getInt32(0), b_.getInt32(1)}); -- b_.CreateMemSet(inet_offset, b_.getInt8(0), 16, 1); -+ b_.CREATE_MEMSET(inet_offset, b_.getInt8(0), 16, 1); - - inet->accept(*this); - if (inet->type.type == Type::array) -@@ -663,7 +663,7 @@ void CodegenLLVM::visit(Call &call) - auto &map = static_cast<Map&>(arg); - Constant *const_str = ConstantDataArray::getString(module_->getContext(), map.ident, true); - AllocaInst *str_buf = b_.CreateAllocaBPF(ArrayType::get(b_.getInt8Ty(), map.ident.length() + 1), "str"); -- b_.CreateMemSet(str_buf, b_.getInt8(0), map.ident.length() + 1, 1); -+ b_.CREATE_MEMSET(str_buf, b_.getInt8(0), map.ident.length() + 1, 1); - b_.CreateStore(const_str, str_buf); - ArrayType *perfdata_type = ArrayType::get(b_.getInt8Ty(), sizeof(uint64_t) + 2 * sizeof(uint64_t) + map.ident.length() + 1); - AllocaInst *perfdata = b_.CreateAllocaBPF(perfdata_type, "perfdata"); -@@ -707,7 +707,7 @@ void CodegenLLVM::visit(Call &call) - auto &map = static_cast<Map&>(arg); - Constant *const_str = ConstantDataArray::getString(module_->getContext(), map.ident, true); - AllocaInst *str_buf = b_.CreateAllocaBPF(ArrayType::get(b_.getInt8Ty(), map.ident.length() + 1), "str"); -- b_.CreateMemSet(str_buf, b_.getInt8(0), map.ident.length() + 1, 1); -+ b_.CREATE_MEMSET(str_buf, b_.getInt8(0), map.ident.length() + 1, 1); - b_.CreateStore(const_str, str_buf); - ArrayType *perfdata_type = ArrayType::get(b_.getInt8Ty(), sizeof(uint64_t) + map.ident.length() + 1); - AllocaInst *perfdata = b_.CreateAllocaBPF(perfdata_type, "perfdata"); -@@ -1204,7 +1204,7 @@ void CodegenLLVM::visit(FieldAccess &acc) - { - AllocaInst *dst = b_.CreateAllocaBPF(field.type, type.cast_type + "." + acc.field); - // memset so verifier doesn't complain about reading uninitialized stack -- b_.CreateMemSet(dst, b_.getInt8(0), field.type.size, 1); -+ b_.CREATE_MEMSET(dst, b_.getInt8(0), field.type.size, 1); - b_.CreateProbeRead(dst, field.bitfield.read_bytes, src); - Value *raw = b_.CreateLoad(dst); - Value *shifted = b_.CreateLShr(raw, field.bitfield.access_rshift); -@@ -1906,7 +1906,7 @@ void CodegenLLVM::createFormatStringCall(Call &call, int &id, CallArgs &call_arg - } - - AllocaInst *fmt_args = b_.CreateAllocaBPF(fmt_struct, call_name + "_args"); -- b_.CreateMemSet(fmt_args, b_.getInt8(0), struct_size, 1); -+ b_.CREATE_MEMSET(fmt_args, b_.getInt8(0), struct_size, 1); - - Value *id_offset = b_.CreateGEP(fmt_args, {b_.getInt32(0), b_.getInt32(0)}); - b_.CreateStore(b_.getInt64(id + asyncactionint(async_action)), id_offset); -diff --git a/src/ast/irbuilderbpf.cpp b/src/ast/irbuilderbpf.cpp -index eb84f7b..5dd72d0 100644 ---- a/src/ast/irbuilderbpf.cpp -+++ b/src/ast/irbuilderbpf.cpp -@@ -82,7 +82,7 @@ AllocaInst *IRBuilderBPF::CreateAllocaBPFInit(const SizedType &stype, const std: - } - else - { -- CreateMemSet(alloca, getInt64(0), stype.size, 1); -+ CREATE_MEMSET(alloca, getInt64(0), stype.size, 1); - } - - restoreIP(ip); -@@ -226,7 +226,7 @@ Value *IRBuilderBPF::CreateMapLookupElem(int mapfd, AllocaInst *key, SizedType & - - SetInsertPoint(lookup_failure_block); - if (is_array) -- CreateMemSet(value, getInt8(0), type.size, 1); -+ CREATE_MEMSET(value, getInt8(0), type.size, 1); - else - CreateStore(getInt64(0), value); - CreateBr(lookup_merge_block); -diff --git a/src/ast/irbuilderbpf.h b/src/ast/irbuilderbpf.h -index 58e6882..6b2e7f1 100644 ---- a/src/ast/irbuilderbpf.h -+++ b/src/ast/irbuilderbpf.h -@@ -18,6 +18,14 @@ - #error Unsupported LLVM version - #endif - -+#if LLVM_VERSION_MAJOR >= 10 -+#define CREATE_MEMSET(ptr, val, size, align) \ -+ CreateMemSet((ptr), (val), (size), MaybeAlign((align))) -+#else -+#define CREATE_MEMSET(ptr, val, size, align) \ -+ CreateMemSet((ptr), (val), (size), (align)) -+#endif -+ - namespace bpftrace { - namespace ast { - |