#8 Link against libclang-cpp.so
Merged 4 years ago by tstellar. Opened 4 years ago by tstellar.
rpms/ tstellar/pocl libclang-cpp  into  master

@@ -0,0 +1,37 @@ 

+ From 70c986461ecb16e0bdf1bcd9cdba2d8b065d5b3d Mon Sep 17 00:00:00 2001

+ From: Tom Stellard <tstellar@redhat.com>

+ Date: Thu, 26 Sep 2019 15:33:58 -0700

+ Subject: [PATCH] Link against libclang-cpp.so

+ 

+ ---

+  cmake/LLVM.cmake | 14 ++++++++++----

+  1 file changed, 10 insertions(+), 4 deletions(-)

+ 

+ diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake

+ index 3184407..3ecfef8 100644

+ --- a/cmake/LLVM.cmake

+ +++ b/cmake/LLVM.cmake

+ @@ -211,10 +211,16 @@ string(REPLACE " -pedantic" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}")

+  string(REGEX REPLACE "-W[^ ]*" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}")

+  

+  # Llvm-config does not include clang libs

+ -set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization

+ -    clangParse clangSema clangRewrite clangRewriteFrontend

+ -    clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers

+ -    clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic)

+ +if(8 LESS LLVM_MAJOR AND LLVM_LIB_IS_SHARED MATCHES "shared")

+ +  # Link against a single shared library instead of multiple component shared

+ +  # libraries.

+ +  set(CLANG_LIBNAMES clang-cpp)

+ +else()

+ +  set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization

+ +      clangParse clangSema clangRewrite clangRewriteFrontend

+ +      clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers

+ +      clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic)

+ +endif()

+  

+  foreach(LIBNAME ${CLANG_LIBNAMES})

+    find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")

+ -- 

+ 1.8.3.1

+ 

file modified
+7 -1
@@ -6,7 +6,7 @@ 

  Name:           pocl

  %global ver 1.4

  Version:        %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(string.lower(ver))}

- Release:        0.1.rc2%{?dist}

+ Release:        0.2.rc2%{?dist}

  

  # The whole code is under MIT

  # except include/utlist.h which is under BSD (and unbundled) and
@@ -17,6 +17,8 @@ 

  Source0:        https://github.com/pocl/pocl/archive/v1.4-RC2.tar.gz

  

  Patch0:		0001-Fix-build-failure.patch

+ # https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package

+ Patch1:		0001-Link-against-libclang-cpp.so.patch

  

  # ppc64le builds fine, but: 97% tests passed, 4 tests failed out of 120

  # ppc64 builds fine, but: 87% tests passed, 16 tests failed out of 120
@@ -133,6 +135,10 @@ 

  %{_libdir}/pkgconfig/%{name}.pc

  

  %changelog

+ * Thu Sep 26 2019 Tom Stellard <tstellar@redhat.com> - 1.4-0.2.rc2

+ - Link against libclang-cpp.so

+ - https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package

+ 

  * Thu Sep 19 2019 Tom Stellard <tstellar@redhat.com> - 1.4-0.1.rc2

  - 1.4-rc2 Release