diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2019-03-20 14:27:23 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2019-03-20 14:27:46 -0700 |
commit | 57cdeba2f33699aa5b5914165130776d8230b71f (patch) | |
tree | 2e3c5fa4b41853d60040d65714100c9fc1474b19 /dev-util/bpftrace | |
parent | media-gfx/xloadimage: arm stable wrt bug #679450 (diff) | |
download | gentoo-57cdeba2f33699aa5b5914165130776d8230b71f.tar.gz gentoo-57cdeba2f33699aa5b5914165130776d8230b71f.tar.bz2 gentoo-57cdeba2f33699aa5b5914165130776d8230b71f.zip |
dev-util/bpftrace: Fix compilation with llvm-8 in 0.9
Patch taken from upstream PR:
https://github.com/iovisor/bpftrace/pull/210
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/bpftrace')
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.9.ebuild | 1 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/dev-util/bpftrace/bpftrace-0.9.ebuild b/dev-util/bpftrace/bpftrace-0.9.ebuild index b483aed0116a..1f481b0f3e2f 100644 --- a/dev-util/bpftrace/bpftrace-0.9.ebuild +++ b/dev-util/bpftrace/bpftrace-0.9.ebuild @@ -38,6 +38,7 @@ QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" PATCHES=( "${FILESDIR}/bpftrace-0.9_pre20190311-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.9-llvm-8.patch b/dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch new file mode 100644 index 000000000000..14d6a167a863 --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch @@ -0,0 +1,30 @@ +diff --git a/src/bpforc.h b/src/bpforc.h +index a6ee583..8d0e579 100644 +--- a/src/bpforc.h ++++ b/src/bpforc.h +@@ -80,8 +80,13 @@ class BpfOrc + ExecutionSession ES; + std::unique_ptr<TargetMachine> TM; + std::shared_ptr<SymbolResolver> Resolver; ++#if LLVM_VERSION_MAJOR >= 8 ++ LegacyRTDyldObjectLinkingLayer ObjectLayer; ++ LegacyIRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; ++#else + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; ++#endif + + public: + std::map<std::string, std::tuple<uint8_t *, uintptr_t>> sections_; +@@ -91,7 +96,11 @@ class BpfOrc + Resolver(createLegacyLookupResolver(ES, + [](const std::string &Name __attribute__((unused))) -> JITSymbol { return nullptr; }, + [](Error Err) { cantFail(std::move(Err), "lookup failed"); })), ++#if LLVM_VERSION_MAJOR >= 8 ++ ObjectLayer(ES, [this](VModuleKey) { return LegacyRTDyldObjectLinkingLayer::Resources{std::make_shared<MemoryManager>(sections_), Resolver}; }), ++#else + ObjectLayer(ES, [this](VModuleKey) { return RTDyldObjectLinkingLayer::Resources{std::make_shared<MemoryManager>(sections_), Resolver}; }), ++#endif + CompileLayer(ObjectLayer, SimpleCompiler(*TM)) {} + + void compileModule(std::unique_ptr<Module> M) { |