]>
Commit | Line | Data |
---|---|---|
f09639cb JB |
1 | # TODO: offload library? (requires Intel COI Runtime + Intel MYO Runtime) |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without fortran # Fortran modules | |
5 | # | |
6 | Summary: Intel OpenMP runtime library implementation for use with Clang | |
7 | Summary(pl.UTF-8): Implementacja biblioteki uruchomieniowej OpenMP firmy Intel dla kompilatora Clang | |
8 | Name: llvm-openmp | |
38d1fb8e | 9 | Version: 17.0.4 |
f09639cb | 10 | Release: 1 |
9445b22a | 11 | License: BSD-like or MIT (OMP), Apache v2.0 (Archer) |
f09639cb | 12 | Group: Libraries |
ee275ea0 | 13 | #Source0Download: https://github.com/llvm/llvm-project/releases/ |
6ea2c50d | 14 | Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/openmp-%{version}.src.tar.xz |
38d1fb8e JB |
15 | # Source0-md5: 1581d82df3a5c2dfb9c010c06ca7b9e0 |
16 | #Source1Download: https://github.com/llvm/llvm-project/releases/ | |
17 | Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz | |
18 | # Source1-md5: 38ae9cc0950f277c8f88e570c4d18010 | |
309bbf6f | 19 | Patch0: openmp-x86.patch |
32149a36 | 20 | URL: https://openmp.llvm.org/ |
38d1fb8e | 21 | BuildRequires: cmake >= 3.20.0 |
f09639cb | 22 | %{?with_fortran:BuildRequires: gcc-fortran} |
38d1fb8e | 23 | BuildRequires: libstdc++-devel >= 6:7 |
f09639cb | 24 | BuildRequires: rpmbuild(macros) >= 1.605 |
32149a36 JB |
25 | BuildRequires: tar >= 1:1.22 |
26 | BuildRequires: xz | |
f08601d3 | 27 | ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc64 |
f09639cb JB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %ifarch %{ix86} | |
31 | %define iomp_arch 32 | |
32 | %endif | |
33 | %ifarch %{x8664} | |
34 | %define iomp_arch 32e | |
35 | %endif | |
f08601d3 | 36 | %ifarch %{arm} aarch64 ppc64 |
f09639cb JB |
37 | %define iomp_arch %{_arch} |
38 | %endif | |
39 | ||
40 | %description | |
41 | The OpenMP subproject of LLVM is intended to contain all of the | |
42 | components required to build an executing OpenMP program that are | |
43 | outside the compiler itself. Support for OpenMP 3.1 in Clang is in the | |
44 | process of being promoted into the Clang mainline, and can be found at | |
45 | OpenMP/Clang: <http://clang-omp.github.io/>. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Podprojekt OpenMP projektu LLVM ma na celu skompletowanie wszystkich | |
49 | komponentów wymaganych do zbudowania działającego programu OpenMP poza | |
50 | samym kompilatorem. Obsługa OpenMP 3.1 w Clangu jest w trakcie | |
51 | włączania do głównej linii kompilatora i można ją znaleźć w | |
52 | repozytorium OpenMP/Clang: <http://clang-omp.github.io/>. | |
53 | ||
1c008bc1 JB |
54 | %package devel |
55 | Summary: Header file for Intel OpenMP implementation | |
56 | Summary(pl.UTF-8): Plik nagłówkowy implementacji OpenMP firmy Intel | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description devel | |
61 | Header file for Intel OpenMP implementation. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
64 | Plik nagłówkowy implementacji OpenMP firmy Intel. | |
65 | ||
f09639cb JB |
66 | %package fortran-devel |
67 | Summary: Fortran modules for Intel OpenMP implementation | |
68 | Summary(pl.UTF-8): Moduły Fortranu implementacji OpenMP firmy Intel | |
69 | Group: Development/Libraries | |
1c008bc1 | 70 | Requires: %{name}-devel = %{version}-%{release} |
f09639cb JB |
71 | |
72 | %description fortran-devel | |
73 | Fortran modules for Intel OpenMP implementation. | |
74 | ||
75 | %description fortran-devel -l pl.UTF-8 | |
76 | Moduły Fortranu implementacji OpenMP firmy Intel. | |
77 | ||
38d1fb8e JB |
78 | %package gdb |
79 | Summary: GDB support for LLVM OpenMP | |
80 | Summary(pl.UTF-8): Obsługa GDB do LLVM OpenMP | |
81 | Group: Development/Tools | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | Requires: gdb | |
84 | ||
85 | %description gdb | |
86 | GDB support for LLVM OpenMP. | |
87 | ||
88 | %description gdb -l pl.UTF-8 | |
89 | Obsługa GDB do LLVM OpenMP. | |
90 | ||
f09639cb | 91 | %prep |
38d1fb8e JB |
92 | %setup -q -c -a1 |
93 | %{__mv} openmp-%{version}.src openmp | |
94 | %{__mv} cmake-%{version}.src cmake | |
95 | cd openmp | |
309bbf6f | 96 | %patch0 -p1 |
f09639cb JB |
97 | |
98 | %build | |
1c008bc1 | 99 | libsubdir=%{_lib} |
38d1fb8e | 100 | %cmake -B build openmp \ |
f08601d3 | 101 | %ifarch %{arm} ppc64 |
1c008bc1 | 102 | -DLIBOMP_ARCH=%{iomp_arch} \ |
f09639cb | 103 | %endif |
1c008bc1 JB |
104 | -DLIBOMP_LIBDIR_SUFFIX="${libsuffix#lib}" \ |
105 | %{?with_fortran:-DLIBOMP_FORTRAN_MODULES=ON} | |
309bbf6f | 106 | # -DLLVM_ENABLE_SPHINX=ON needs llvm sources |
f09639cb | 107 | |
38d1fb8e | 108 | %{__make} -C build |
f09639cb JB |
109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
f09639cb | 112 | |
f08601d3 JB |
113 | %{__make} -C build install \ |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | ||
116 | # libgomp dropin symlink, but PLD ships original libgomp | |
117 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgomp.so | |
f09639cb JB |
118 | |
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post -p /sbin/ldconfig | |
123 | %postun -p /sbin/ldconfig | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
38d1fb8e | 127 | %doc openmp/{CREDITS.txt,LICENSE.TXT,README.rst} openmp/docs/ReleaseNotes.rst |
9445b22a | 128 | %attr(755,root,root) %{_libdir}/libarcher.so |
1c008bc1 | 129 | %attr(755,root,root) %{_libdir}/libomp.so |
309bbf6f | 130 | %attr(755,root,root) %{_libdir}/libompd.so |
38d1fb8e | 131 | %ifarch %{x8664} aarch64 ppc64 |
309bbf6f | 132 | %attr(755,root,root) %{_libdir}/libomptarget.so |
38d1fb8e | 133 | %endif |
1c008bc1 JB |
134 | |
135 | %files devel | |
136 | %defattr(644,root,root,755) | |
f08601d3 | 137 | %attr(755,root,root) %{_libdir}/libiomp5.so |
9445b22a | 138 | %{_libdir}/libarcher_static.a |
f08601d3 | 139 | %{_includedir}/omp.h |
6ea2c50d | 140 | %{_includedir}/omp-tools.h |
f08601d3 | 141 | %{_includedir}/ompt.h |
32149a36 | 142 | %{_includedir}/ompt-multiplex.h |
309bbf6f | 143 | %{_libdir}/cmake/openmp |
f09639cb JB |
144 | |
145 | %if %{with fortran} | |
146 | %files fortran-devel | |
147 | %defattr(644,root,root,755) | |
f08601d3 JB |
148 | %{_includedir}/omp_lib.h |
149 | %{_includedir}/omp_lib.mod | |
150 | %{_includedir}/omp_lib_kinds.mod | |
f09639cb | 151 | %endif |
38d1fb8e JB |
152 | |
153 | %files gdb | |
154 | %defattr(644,root,root,755) | |
155 | %dir %{_datadir}/gdb/python/ompd | |
156 | %{_datadir}/gdb/python/ompd/*.py | |
157 | # FIXME: should be in arch-dependent directory | |
158 | %attr(755,root,root) %{_datadir}/gdb/python/ompd/ompdModule.so |