Rebase to newest release version

- Resolves #1591989

Signed-off-by: Rafael dos Santos <rdossant@redhat.com>
This commit is contained in:
Rafael dos Santos 2018-06-18 14:22:34 +02:00
parent e63764f404
commit 00b843826c
5 changed files with 7 additions and 100 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/bcc-0.3.0.tar.gz
/bcc-0.4.0.tar.gz
/bcc-0.5.0.tar.gz
/bcc-0.6.0.tar.gz

View File

@ -1,25 +0,0 @@
From 56f7d9aa223d9123174f6eec9683111f063794fc Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date: Wed, 1 Nov 2017 08:07:10 +0100
Subject: [PATCH] set SOVERSION for bpf-shared
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
src/cc/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
index c31936e..b552f45 100644
--- a/src/cc/CMakeLists.txt
+++ b/src/cc/CMakeLists.txt
@@ -25,6 +25,7 @@ include(static_libstdc++)
add_library(bpf-static STATIC libbpf.c perf_reader.c)
set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bpf)
add_library(bpf-shared SHARED libbpf.c perf_reader.c)
+set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0)
set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bpf)
set(bcc_common_sources bpf_common.cc bpf_module.cc exported_files.cc)
--
2.14.3

View File

@ -6,13 +6,12 @@
%endif
Name: bcc
Version: 0.5.0
Release: 4%{?dist}
Version: 0.6.0
Release: 1%{?dist}
Summary: BPF Compiler Collection (BCC)
License: ASL 2.0
URL: https://github.com/iovisor/bcc
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: clang-api.patch
# Arches will be included as upstream support is added and dependencies are
# satisfied in the respective arches
@ -164,6 +163,9 @@ mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/
%changelog
* Mon Jun 18 2018 Rafael dos Santos <rdossant@redhat.com> - 0.6.0-1
- Rebase to new released version (#1591989)
* Thu Apr 05 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-4
- Resolves #1555627 - fix compilation error with latest llvm/clang

View File

@ -1,71 +0,0 @@
From c0d1694e28336cbe4a57f420dd33c5e3bfaa2df9 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yhs@fb.com>
Date: Thu, 28 Dec 2017 13:34:06 -0800
Subject: [PATCH] fix a compilation error with latest llvm/clang trunk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
bcc build with latest llvm/clang trunk failed with the
below error:
......
[ 35%] Built target api-static
/home/yhs/work/bcc/src/cc/frontends/clang/tp_frontend_action.cc: In member function bool ebpf::TracepointTypeVisitor::Visit
FunctionDecl(clang::FunctionDecl*):
/home/yhs/work/bcc/src/cc/frontends/clang/tp_frontend_action.cc:163:60: error: no matching function for call to clang::Qual
Type::getAsString(clang::SplitQualType)
auto type_name = QualType::getAsString(type.split());
^
......
The error is caused by the below clang commit:
commit fcc28fd8cc8139cf1e4763459447880768579d8e
Author: Aaron Ballman <aaron@aaronballman.com>
Date: Thu Dec 21 21:42:42 2017 +0000
Re-commit r321223, which adds a printing policy to the ASTDumper.
......
- std::string getAsString() const {
- return getAsString(split());
+ static std::string getAsString(SplitQualType split,
+ const PrintingPolicy &Policy) {
+ return getAsString(split.Ty, split.Quals, Policy);
}
+ static std::string getAsString(const Type *ty, Qualifiers qs,
+ const PrintingPolicy &Policy);
- static std::string getAsString(SplitQualType split) {
- return getAsString(split.Ty, split.Quals);
- }
-
- static std::string getAsString(const Type *ty, Qualifiers qs);
-
+ std::string getAsString() const;
std::string getAsString(const PrintingPolicy &Policy) const;
......
The signature of static function getAsString(), which is used
in src/cc/frontends/clang/tp_frontend_action.cc, got changed,
and this caused the compilation error.
The patch chooses a different way to get type_name which works
for llvm 4.0 to 6.0 (tested).
Signed-off-by: Yonghong Song <yhs@fb.com>
---
src/cc/frontends/clang/tp_frontend_action.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cc/frontends/clang/tp_frontend_action.cc b/src/cc/frontends/clang/tp_frontend_action.cc
index b8818baff..3b46a62a9 100644
--- a/src/cc/frontends/clang/tp_frontend_action.cc
+++ b/src/cc/frontends/clang/tp_frontend_action.cc
@@ -160,7 +160,7 @@ bool TracepointTypeVisitor::VisitFunctionDecl(FunctionDecl *D) {
auto type = arg->getType();
if (type->isPointerType() &&
type->getPointeeType()->isStructureOrClassType()) {
- auto type_name = QualType::getAsString(type.split());
+ auto type_name = type->getPointeeType().getAsString();
string tp_cat, tp_evt;
if (_is_tracepoint_struct_type(type_name, tp_cat, tp_evt)) {
string tp_struct = GenerateTracepointStruct(

View File

@ -1 +1 @@
SHA512 (bcc-0.5.0.tar.gz) = 12de5ef04185dccd0847fc97ae855b386e0c81b545ae497af797667925ebedf97164c17fb99468abae3f87fb3ddfdba5200070f80b3bbcad63c2355497012f0e
SHA512 (bcc-0.6.0.tar.gz) = 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80