[packages/llvm] allow CMAKE_BUILD_TYPE=PLD
glen
glen at pld-linux.org
Sat Oct 1 15:08:17 CEST 2016
commit d96b39d38697f4c9df813b31aec394764b306084
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Oct 1 15:56:10 2016 +0300
allow CMAKE_BUILD_TYPE=PLD
cmake-buildtype.patch | 16 ++++++++++++++++
llvm.spec | 7 +++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/llvm.spec b/llvm.spec
index 66dc10c..290d98c 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -46,6 +46,7 @@ Patch0: %{name}-lld-link.patch
Patch1: %{name}-pld.patch
Patch2: libdir.patch
Patch3: x32-gcc-toolchain.patch
+Patch4: cmake-buildtype.patch
URL: http://llvm.org/
BuildRequires: bash
BuildRequires: bison
@@ -485,6 +486,7 @@ mv lld-%{version}.src tools/lld
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
s,^#!.*bin/env python,#!%{__python},
@@ -499,7 +501,7 @@ install -d build
cd build
CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
-%{cmake} ../ \
+%cmake \
%ifarch %{x8664}
-DLLVM_LIBDIR_SUFFIX:STRING=64 \
%endif
@@ -516,7 +518,8 @@ CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
-DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
-DLLVM_ENABLE_CXX1Y:BOOL=ON \
-DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
- -DBUILD_SHARED_LIBS:BOOL=ON
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ ../
%{__make} \
VERBOSE=1 \
diff --git a/cmake-buildtype.patch b/cmake-buildtype.patch
new file mode 100644
index 0000000..5dbe193
--- /dev/null
+++ b/cmake-buildtype.patch
@@ -0,0 +1,16 @@
+allow CMAKE_BUILD_TYPE=PLD
+
+--- llvm-3.8.0.src/CMakeLists.txt~ 2016-01-13 21:03:44.000000000 +0200
++++ llvm-3.8.0.src/CMakeLists.txt 2016-10-01 15:54:42.749630541 +0300
+@@ -174,11 +174,6 @@
+
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+
+-if (CMAKE_BUILD_TYPE AND
+- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-endif()
+-
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+
+ # They are used as destination of target generators.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/llvm.git/commitdiff/d96b39d38697f4c9df813b31aec394764b306084
More information about the pld-cvs-commit
mailing list