Accepting request 334126 from devel:tools:compiler

OBS-URL: https://build.opensuse.org/request/show/334126
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=75
This commit is contained in:
Dominique Leuenberger 2015-10-02 07:23:01 +00:00 committed by Git OBS Bridge
commit 820910456e
3 changed files with 42 additions and 5 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sun Sep 27 12:03:57 UTC 2015 - idonmez@suse.com
- Enable OpenMP for x86, x86_64, ppc64 and ppc64le
-------------------------------------------------------------------
Mon Sep 14 13:10:49 UTC 2015 - idonmez@suse.com
- Enable all targets on x86, x86_64
-------------------------------------------------------------------
Wed Sep 2 08:14:39 UTC 2015 - idonmez@suse.com

View File

@ -20,11 +20,16 @@
%define _release_version 3.7.0
%define build_libcxx 0
%define build_openmp 0
%ifarch x86_64
%define build_libcxx 1
%endif
%ifarch ppc64 ppc64le %{ix86} x86_64
%define build_openmp 1
%endif
Name: llvm
Version: 3.7.0
Release: 0
@ -37,13 +42,14 @@ Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
Source3: http://llvm.org/releases/%{version}/libcxx-%{version}.src.tar.xz
Source4: http://llvm.org/releases/%{version}/libcxxabi-%{version}.src.tar.xz
Source5: http://llvm.org/releases/%{version}/openmp-%{version}.src.tar.xz
# Manually created docs
# cd docs
# make -f Makefile.sphinx man html
# cd ..
# tar cvJf llvm-docs-3.7.0.src.tar.xz llvm-3.7.0.src/docs/_build/{man,html}
Source5: llvm-docs-%{version}.src.tar.xz
Source6: cfe-docs-%{version}.src.tar.xz
Source6: llvm-docs-%{version}.src.tar.xz
Source7: cfe-docs-%{version}.src.tar.xz
Source100: %{name}-rpmlintrc
Source101: baselibs.conf
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
@ -152,7 +158,7 @@ Requires: python
This package contains the Python bindings to clang (C language) frontend for LLVM.
%prep
%setup -q -a 1 -a 2 -a 3 -a 4 -a 6 -b 5 -n %{name}-%{version}.src
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 7 -b 6 -n %{name}-%{version}.src
%patch1
%patch2
%patch3
@ -168,6 +174,10 @@ This package contains the Python bindings to clang (C language) frontend for LLV
mv cfe-%{version}.src tools/clang
mv compiler-rt-%{version}.src projects/compiler-rt
%if %{build_openmp}
mv openmp-%{version}.src projects/openmp
%endif
%if %{build_libcxx}
mv libcxx-%{version}.src projects/libcxx
mv libcxxabi-%{version}.src projects/libcxxabi
@ -262,8 +272,11 @@ cmake -G "Ninja" \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
%if %{build_openmp}
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp \
%endif
%ifarch %{ix86} x86_64
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \
-DLLVM_TARGETS_TO_BUILD="all" \
%else
-DLLVM_TARGETS_TO_BUILD=host \
%endif
@ -309,8 +322,11 @@ cmake -G "Ninja" \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
%if %{build_openmp}
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp \
%endif
%ifarch %{ix86} x86_64
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \
-DLLVM_TARGETS_TO_BUILD="all" \
%else
-DLLVM_TARGETS_TO_BUILD=host \
%endif
@ -417,6 +433,10 @@ mv utils/vim/README utils/vim/README.vim
# Stuff we don't want to include
rm %{buildroot}%{_mandir}/man1/lit.1
%if %{build_openmp}
rm -f %{buildroot}%{_libdir}/libgomp.so
%endif
%if %{build_libcxx}
# Create an libc++.so as an ldscript
rm %{buildroot}%{_libdir}/libc++.so
@ -483,6 +503,10 @@ EOF
%{_datadir}/clang
%{_mandir}/man1/clang.1%{ext_man}
%{_libdir}/libLTO.*
%if %{build_openmp}
%{_libdir}/libomp.so
%{_libdir}/libiomp5.so
%endif
%if %{build_libcxx}
%{_libdir}/libc++*
%{_includedir}/c++/*

3
openmp-3.7.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d8a224e5689596a35652fda87e4be29853c4b85fbc7a6562019badfad779f2a
size 2251108