From 3361748dd0faf889a0cd824e6b4a5b8bedf67cb900e47cd8634b3b73b05e628f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 14 Sep 2015 13:11:27 +0000 Subject: [PATCH 1/3] - Enable all targets on x86, x86_64 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=423 --- llvm.changes | 5 +++++ llvm.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/llvm.changes b/llvm.changes index 597b293..28d7808 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/llvm.spec b/llvm.spec index a1789b2..850444a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -263,7 +263,7 @@ cmake -G "Ninja" \ -DLLVM_ENABLE_PIC=ON \ -DLLVM_BINUTILS_INCDIR=/usr/include \ %ifarch %{ix86} x86_64 - -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \ + -DLLVM_TARGETS_TO_BUILD="all" \ %else -DLLVM_TARGETS_TO_BUILD=host \ %endif @@ -310,7 +310,7 @@ cmake -G "Ninja" \ -DLLVM_ENABLE_PIC=ON \ -DLLVM_BINUTILS_INCDIR=/usr/include \ %ifarch %{ix86} x86_64 - -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \ + -DLLVM_TARGETS_TO_BUILD="all" \ %else -DLLVM_TARGETS_TO_BUILD=host \ %endif From 1917264adae117294aa5025eb8677f689af59aff7819b21a0cc1fcaad14df4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 27 Sep 2015 13:53:04 +0000 Subject: [PATCH 2/3] - Enable OpenMP for x86, x86_64, ppc64 and ppc64le OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=424 --- llvm.changes | 5 +++++ llvm.spec | 29 ++++++++++++++++++++++++++--- openmp-3.7.0.src.tar.xz | 3 +++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 openmp-3.7.0.src.tar.xz diff --git a/llvm.changes b/llvm.changes index 28d7808..bdbb24d 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/llvm.spec b/llvm.spec index 850444a..19c7662 100644 --- a/llvm.spec +++ b/llvm.spec @@ -25,6 +25,10 @@ %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 +41,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 +157,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 +173,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,6 +271,9 @@ 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="all" \ %else @@ -309,6 +321,9 @@ 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="all" \ %else @@ -417,6 +432,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 +502,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++/* diff --git a/openmp-3.7.0.src.tar.xz b/openmp-3.7.0.src.tar.xz new file mode 100644 index 0000000..aef207b --- /dev/null +++ b/openmp-3.7.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d8a224e5689596a35652fda87e4be29853c4b85fbc7a6562019badfad779f2a +size 2251108 From 9c1a0ff2b6e6d9ff52ad19829efae4106856ef59b3e20cd477767edc728f66d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 27 Sep 2015 17:40:01 +0000 Subject: [PATCH 3/3] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=425 --- llvm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm.spec b/llvm.spec index 19c7662..80119e3 100644 --- a/llvm.spec +++ b/llvm.spec @@ -20,6 +20,7 @@ %define _release_version 3.7.0 %define build_libcxx 0 +%define build_openmp 0 %ifarch x86_64 %define build_libcxx 1