import bcc-0.20.0-8.el9
This commit is contained in:
parent
7a2f37715b
commit
6918229d8b
46
SOURCES/bcc-0.20.0-Fix-a-llvm-compilation-error.patch
Normal file
46
SOURCES/bcc-0.20.0-Fix-a-llvm-compilation-error.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From e2a4a556755d3c5ae7538ba9bcb731f93b9f81c9 Mon Sep 17 00:00:00 2001
|
||||
From: Yonghong Song <yhs@fb.com>
|
||||
Date: Tue, 25 May 2021 19:58:00 -0700
|
||||
Subject: [PATCH] Fix a llvm compilation error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Current llvm trunk (https://github.com/llvm/llvm-project)
|
||||
will cause the following compilation errors:
|
||||
/home/yhs/work/bcc/src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
|
||||
/home/yhs/work/bcc/src/cc/bcc_debug.cc:135:75: error: no matching function for call to
|
||||
‘llvm::MCContext::MCContext(llvm::Triple&, std::unique_ptr<llvm::MCAsmInfo>::pointer,
|
||||
std::unique_ptr<llvm::MCRegisterInfo>::pointer, llvm::MCObjectFileInfo*,
|
||||
std::unique_ptr<llvm::MCSubtargetInfo>::pointer, std::nullptr_t)’
|
||||
MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
|
||||
^
|
||||
......
|
||||
|
||||
This is because upstream patch https://reviews.llvm.org/D101921
|
||||
refactored MCObjectFileInfo initialization and changed MCContext
|
||||
constructor signature.
|
||||
|
||||
This patch fixed the issue by following the new code patterns
|
||||
in https://reviews.llvm.org/D101921.
|
||||
---
|
||||
src/cc/bcc_debug.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cc/bcc_debug.cc b/src/cc/bcc_debug.cc
|
||||
index 775c9141..97d6d95b 100644
|
||||
--- a/src/cc/bcc_debug.cc
|
||||
+++ b/src/cc/bcc_debug.cc
|
||||
@@ -132,7 +132,8 @@ void SourceDebugger::dump() {
|
||||
T->createMCSubtargetInfo(TripleStr, "", ""));
|
||||
MCObjectFileInfo MOFI;
|
||||
#if LLVM_MAJOR_VERSION >= 13
|
||||
- MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
|
||||
+ MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), nullptr);
|
||||
+ Ctx.setObjectFileInfo(&MOFI);
|
||||
MOFI.initMCObjectFileInfo(Ctx, false, false);
|
||||
#else
|
||||
MCContext Ctx(MAI.get(), MRI.get(), &MOFI, nullptr);
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,41 @@
|
||||
From fd0585d5d8a1a47912ae7a70721d3cab0c7d06f8 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 14 Jun 2021 12:49:43 -0700
|
||||
Subject: [PATCH] Remove APInt/APSInt toString() std::string variants
|
||||
|
||||
clang 13+ has removed this in favour of a pair of llvm::toString
|
||||
() helpers inside StringExtras.h to improve compile speed by avoiding
|
||||
hits on <string> header
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/cc/json_map_decl_visitor.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/cc/json_map_decl_visitor.cc b/src/cc/json_map_decl_visitor.cc
|
||||
index eff4d067..53896199 100644
|
||||
--- a/src/cc/json_map_decl_visitor.cc
|
||||
+++ b/src/cc/json_map_decl_visitor.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <clang/AST/ASTContext.h>
|
||||
#include <clang/AST/RecordLayout.h>
|
||||
#include <clang/AST/RecursiveASTVisitor.h>
|
||||
+#include <llvm/ADT/StringExtras.h>
|
||||
#include "common.h"
|
||||
#include "table_desc.h"
|
||||
|
||||
@@ -79,7 +80,11 @@ void BMapDeclVisitor::genJSONForField(FieldDecl *F) {
|
||||
result_ += "[";
|
||||
TraverseDecl(F);
|
||||
if (const ConstantArrayType *T = dyn_cast<ConstantArrayType>(F->getType()))
|
||||
+#if LLVM_MAJOR_VERSION >= 13
|
||||
+ result_ += ", [" + toString(T->getSize(), 10, false) + "]";
|
||||
+#else
|
||||
result_ += ", [" + T->getSize().toString(10, false) + "]";
|
||||
+#endif
|
||||
if (F->isBitField())
|
||||
result_ += ", " + to_string(F->getBitWidthValue(C));
|
||||
result_ += "], ";
|
||||
--
|
||||
2.31.1
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
Name: bcc
|
||||
Version: 0.20.0
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Summary: BPF Compiler Collection (BCC)
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/iovisor/bcc
|
||||
@ -42,6 +42,8 @@ Patch6: %{name}-%{version}-Update-cpudist.py.patch
|
||||
Patch7: %{name}-%{version}-tools-readahead-compatible-with-kernel-version-5.10-.patch
|
||||
Patch8: %{name}-%{version}-Fix-mdflush-on-RHEL9.patch
|
||||
Patch9: %{name}-%{version}-Handle-renaming-of-task_struct_-state-field-on-RHEL-.patch
|
||||
Patch10: %{name}-%{version}-Fix-a-llvm-compilation-error.patch
|
||||
Patch11: %{name}-%{version}-Remove-APInt-APSInt-toString-std-string-variants.patch
|
||||
|
||||
# Arches will be included as upstream support is added and dependencies are
|
||||
# satisfied in the respective arches
|
||||
@ -253,6 +255,9 @@ install libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 22 2021 Jerome Marchand <jmarchan@redhat.com> - 0.20.0-8
|
||||
- Rebuild for LLVM 13
|
||||
|
||||
* Thu Oct 14 2021 Jerome Marchand <jmarchan@redhat.com> - 0.20.0-7
|
||||
- Sync with latest libbpf (fixes BPF_F_BROADCAST breakages of rhbz#1992430)
|
||||
- Fix cpudist, mdflush, readahead and threadsnoop (rhbz#1992430)
|
||||
|
Loading…
Reference in New Issue
Block a user