Tom Stellard 2019-12-13 18:33:12 +00:00
parent f110e47581
commit eda200eda7
2 changed files with 44 additions and 1 deletions

View File

@ -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

View File

@ -6,7 +6,7 @@ Summary: Portable Computing Language - an OpenCL implementation
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 @@ URL: http://pocl.sourceforge.net
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 @@ popd
%{_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