Skip to content

Commit

Permalink
fix build issue for llvm 5.0.1
Browse files Browse the repository at this point in the history
Fix issue iovisor#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 <[email protected]>
  • Loading branch information
yonghong-song committed Dec 28, 2017
1 parent 4e04c94 commit bd7fa55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/clang_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit bd7fa55

Please sign in to comment.