]>
Commit | Line | Data |
---|---|---|
06b6a911 | 1 | |
8b0584c7 | 2 | # requires the OpenCL patches |
d70e1e15 | 3 | %define llvm_version 13.0.0 |
8b0584c7 | 4 | |
d70e1e15 | 5 | %define opencl_clang_version 13.0.0 |
06b6a911 JK |
6 | |
7 | Summary: The Intel Graphics Compiler for OpenCL | |
8 | Name: intel-graphics-compiler | |
d70e1e15 | 9 | Version: 1.0.8744 |
fda78cb7 | 10 | Release: 1 |
06b6a911 JK |
11 | License: MIT |
12 | Group: Libraries | |
13 | Source0: https://github.com/intel/intel-graphics-compiler/archive/igc-%{version}/igc-%{version}.tar.gz | |
d70e1e15 JP |
14 | # Source0-md5: 924a22c69af76c9679a6fa799d555bd2 |
15 | Source1: https://github.com/llvm/llvm-project/raw/llvmorg-%{llvm_version}/libunwind/include/mach-o/compact_unwind_encoding.h | |
16 | # Source1-md5: de130d4e72f9e1c750ce09deee4aad4e | |
06b6a911 | 17 | Patch0: pkgconfig.patch |
9b211843 | 18 | Patch1: cxx_flags.patch |
6a191e06 | 19 | Patch2: missing-header.patch |
06b6a911 | 20 | URL: https://github.com/intel/intel-graphics-compiler/ |
d70e1e15 | 21 | BuildRequires: lld-devel >= %{llvm_version} |
06b6a911 JK |
22 | BuildRequires: llvm-devel >= %{llvm_version} |
23 | BuildRequires: opencl-clang-devel >= %{opencl_clang_version} | |
24 | BuildRequires: cmake >= 3.2.0 | |
25 | BuildRequires: pkgconfig | |
d222cd6c | 26 | BuildRequires: rpmbuild(macros) >= 1.605 |
06b6a911 JK |
27 | Requires: %{name}-libs = %{version}-%{release} |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
3ac63ffc JP |
31 | The Intel Graphics Compiler for OpenCL is an LLVM based compiler for |
32 | OpenCL targeting Intel Gen graphics hardware architecture. | |
06b6a911 JK |
33 | |
34 | %package libs | |
35 | Summary: The Intel Graphics Compiler for OpenCL libraries | |
36 | Group: Libraries | |
37 | ||
38 | %description libs | |
39 | The Intel Graphics Compiler for OpenCL libraries. | |
40 | ||
41 | %package devel | |
42 | Summary: Header files for %{name} library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
44 | Group: Development/Libraries | |
ba53ee66 | 45 | Requires: llvm-devel >= %{llvm_version} |
06b6a911 JK |
46 | Requires: %{name}-libs = %{version}-%{release} |
47 | ||
48 | %description devel | |
49 | Header files for %{name} library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pliki nagłówkowe biblioteki %{name}. | |
53 | ||
54 | %prep | |
55 | %setup -qn %{name}-igc-%{version} | |
56 | ||
57 | %patch0 -p1 | |
9b211843 | 58 | %patch1 -p1 |
6a191e06 | 59 | %patch2 -p1 |
06b6a911 | 60 | |
d70e1e15 JP |
61 | install -D %{SOURCE1} build/IGC/llvm-deps/src/libunwind/include/mach-o/compact_unwind_encoding.h |
62 | ||
63 | %{__sed} -i -e 's/-Werror/-Werror -Wno-error=deprecated-declarations -Wno-error=nonnull/' IGC/CMakeLists.txt | |
2b81df68 | 64 | |
06b6a911 JK |
65 | %build |
66 | install -d build | |
67 | cd build | |
68 | %cmake \ | |
9b211843 JK |
69 | -DCMAKE_BUILD_TYPE=Release \ |
70 | -DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS:-%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG}" \ | |
06b6a911 | 71 | -DCCLANG_FROM_SYSTEM=ON \ |
fda78cb7 | 72 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=%{llvm_version} \ |
2b81df68 | 73 | -DIGC_BUILD__VC_ENABLED=OFF \ |
06b6a911 JK |
74 | ../ |
75 | %{__make} | |
76 | ||
77 | cd .. | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %{__make} -C build install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc README.md | |
91 | %attr(755,root,root) %{_bindir}/GenX_IR | |
8bad0443 | 92 | %ifarch %{x8664} |
06b6a911 | 93 | %attr(755,root,root) %{_bindir}/iga64 |
8bad0443 JK |
94 | %else |
95 | %attr(755,root,root) %{_bindir}/iga32 | |
96 | %endif | |
06b6a911 JK |
97 | |
98 | %files libs | |
99 | %defattr(644,root,root,755) | |
8bad0443 | 100 | %ifarch %{x8664} |
06b6a911 JK |
101 | %attr(755,root,root) %{_libdir}/libiga64.so.1.*.* |
102 | %ghost %attr(755,root,root) %{_libdir}/libiga64.so.1 | |
8bad0443 | 103 | %else |
aea765ea | 104 | %attr(755,root,root) %{_libdir}/libiga32.so.1.*.* |
8bad0443 JK |
105 | %ghost %attr(755,root,root) %{_libdir}/libiga32.so.1 |
106 | %endif | |
06b6a911 JK |
107 | %attr(755,root,root) %{_libdir}/libigc.so.1.*.* |
108 | %ghost %attr(755,root,root) %{_libdir}/libigc.so.1 | |
109 | %attr(755,root,root) %{_libdir}/libigdfcl.so.1.*.* | |
110 | %ghost %attr(755,root,root) %{_libdir}/libigdfcl.so.1 | |
111 | ||
112 | %files devel | |
113 | %defattr(644,root,root,755) | |
380530b6 | 114 | %{_includedir}/iga |
06b6a911 | 115 | %{_includedir}/igc |
380530b6 | 116 | %{_includedir}/visa |
8bad0443 | 117 | %ifarch %{x8664} |
06b6a911 | 118 | %attr(755,root,root) %{_libdir}/libiga64.so |
8bad0443 JK |
119 | %else |
120 | %attr(755,root,root) %{_libdir}/libiga32.so | |
121 | %endif | |
06b6a911 JK |
122 | %attr(755,root,root) %{_libdir}/libigc.so |
123 | %attr(755,root,root) %{_libdir}/libigdfcl.so | |
124 | %{_pkgconfigdir}/igc-opencl.pc |