A new user interface for you! Read more...

File bcc-fix-build-for-llvm-5.0.1.patch of Package bcc

From bd7fa55bb39b8978dafd0b299e35616061e0a368 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yhs@fb.com>
Date: Wed, 27 Dec 2017 22:22:43 -0800
Subject: [PATCH] fix build issue for llvm 5.0.1

Fix issue #1502.
A few cmake version checking greater than 5 includes 5.0.1
which results in compilation failure. Change version checking
to explicitly equal to or greater than version 6.

Signed-off-by: Yonghong Song <yhs@fb.com>
---
 cmake/clang_libs.cmake | 2 +-
 src/cc/CMakeLists.txt  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/clang_libs.cmake b/cmake/clang_libs.cmake
index cd7f189..cf1b10f 100644
--- a/cmake/clang_libs.cmake
+++ b/cmake/clang_libs.cmake
@@ -8,7 +8,7 @@ list(FIND LLVM_AVAILABLE_LIBS "LLVMCoroutines" _llvm_coroutines)
 if (${_llvm_coroutines} GREATER -1)
   list(APPEND llvm_raw_libs coroutines)
 endif()
-if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
+if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
   list(APPEND llvm_raw_libs bpfasmparser)
   list(APPEND llvm_raw_libs bpfdisassembler)
 endif()
diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
index 1a52782..3f6855c 100644
--- a/src/cc/CMakeLists.txt
+++ b/src/cc/CMakeLists.txt
@@ -29,7 +29,7 @@ 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)
-if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
+if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
   set(bcc_common_sources ${bcc_common_sources} bcc_debug.cc)
 endif()
 
-- 
2.15.1