]>
Commit | Line | Data |
---|---|---|
bc88141a | 1 | # |
9556f4c9 | 2 | # Conditional build: |
5a7ac479 | 3 | %bcond_without lldb # LLDB debugger |
b0068ae4 | 4 | %bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization |
5a7ac479 JB |
5 | %bcond_without rt # compiler-rt libraries |
6 | %bcond_without ocaml # OCaml binding | |
b0068ae4 | 7 | %bcond_without doc # HTML docs and man pages |
5a7ac479 | 8 | %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default) |
8132e62b | 9 | %bcond_with tests # run tests |
9556f4c9 ER |
10 | |
11 | %ifarch s390 s390x sparc64 | |
12 | # No ocaml on these arches | |
13 | %undefine with_ocaml | |
14 | %endif | |
15 | ||
aa11c230 | 16 | Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure) |
2326a99f | 17 | Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego) |
aa11c230 | 18 | Name: llvm |
0b1eebd9 JB |
19 | Version: 3.5.1 |
20 | Release: 1 | |
aa11c230 | 21 | License: University of Illinois/NCSA Open Source License |
22 | Group: Development/Languages | |
dd9350c7 | 23 | #Source0Download: http://llvm.org/releases/download.html |
b883cf1e | 24 | Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz |
0b1eebd9 | 25 | # Source0-md5: 2d3d8004f38852aa679e5945b8ce0b14 |
b883cf1e | 26 | Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz |
0b1eebd9 | 27 | # Source1-md5: 93f9532f8f7e6f1d8e5c1116907051cb |
b883cf1e | 28 | Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz |
0b1eebd9 | 29 | # Source2-md5: d626cfb8a9712cb92b820798ab5bc1f8 |
b883cf1e | 30 | Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz |
0b1eebd9 | 31 | # Source3-md5: cc5ea8a414c62c33e760517f8929a204 |
b883cf1e | 32 | Source4: http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz |
0b1eebd9 | 33 | # Source4-md5: b02e005a54e0911ccd8b7f1ca039cb51 |
b883cf1e | 34 | Source5: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz |
0b1eebd9 | 35 | # Source5-md5: f13f31ed3038acadc6fa63fef812a246 |
ba1cf74d | 36 | Source6: http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz |
0b1eebd9 | 37 | # Source6-md5: 173be02b7ff4e5e31fbb0a591a03d7a3 |
ebde279d | 38 | Patch0: %{name}-config.patch |
d997b14b | 39 | # Data files should be installed with timestamps preserved |
ebde279d JB |
40 | Patch1: %{name}-2.6-timestamp.patch |
41 | Patch2: %{name}-pld.patch | |
b883cf1e JB |
42 | Patch3: %{name}-polly-update.patch |
43 | Patch4: %{name}-lldb.patch | |
64f4e87f JB |
44 | Patch5: %{name}-lldb-atomic.patch |
45 | Patch6: %{name}-lld-link.patch | |
2326a99f | 46 | URL: http://llvm.org/ |
ebde279d JB |
47 | BuildRequires: autoconf >= 2.60 |
48 | BuildRequires: automake >= 1:1.9.6 | |
bc88141a | 49 | BuildRequires: bash |
d997b14b | 50 | BuildRequires: bison |
d997b14b | 51 | BuildRequires: flex |
dd9350c7 JB |
52 | BuildRequires: gcc >= 5:3.4 |
53 | # gcc4 might be installed, but not current __cc | |
54 | %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4" | |
55 | BuildRequires: __cc >= 3.4 | |
9556f4c9 | 56 | %endif |
d997b14b | 57 | BuildRequires: groff |
bc88141a | 58 | BuildRequires: libltdl-devel |
ebde279d | 59 | BuildRequires: libtool >= 2:1.5.22 |
d997b14b AM |
60 | BuildRequires: libstdc++-devel >= 5:3.4 |
61 | BuildRequires: ocaml-ocamldoc | |
8132e62b | 62 | BuildRequires: perl-base >= 1:5.6 |
8c156e7d | 63 | BuildRequires: perl-tools-pod |
64 | BuildRequires: rpm-pythonprov | |
b0068ae4 | 65 | %{?with_doc:BuildRequires: sphinx-pdg} |
b883cf1e JB |
66 | BuildRequires: tar >= 1:1.22 |
67 | BuildRequires: xz | |
dd9350c7 JB |
68 | %if %{with apidocs} |
69 | BuildRequires: doxygen | |
70 | BuildRequires: graphviz | |
71 | %endif | |
72 | %if %{with tests} | |
73 | BuildRequires: dejagnu | |
74 | BuildRequires: python | |
75 | BuildRequires: tcl-devel | |
356a0bbd | 76 | %endif |
b883cf1e | 77 | %if %{with lldb} |
64f4e87f JB |
78 | %ifarch i386 i486 |
79 | BuildRequires: libatomic-devel | |
80 | %endif | |
b883cf1e JB |
81 | BuildRequires: libedit-devel |
82 | BuildRequires: libxml2-devel >= 2 | |
83 | BuildRequires: ncurses-ext-devel | |
84 | BuildRequires: python-devel >= 2 | |
85 | %endif | |
b0068ae4 JB |
86 | %if %{with polly} |
87 | BuildRequires: cloog-isl-devel | |
b883cf1e | 88 | # >= 0.18.2-2 |
b0068ae4 | 89 | BuildRequires: gmp-devel |
b883cf1e JB |
90 | BuildRequires: isl-devel >= 0.13 |
91 | # optional | |
3eca6fe9 | 92 | BuildRequires: pluto-devel |
b883cf1e | 93 | BuildRequires: scoplib-devel >= 0.2.1-2 |
b0068ae4 JB |
94 | #cuda-devel |
95 | %endif | |
8c514f23 | 96 | Requires: %{name}-libs = %{version}-%{release} |
9556f4c9 ER |
97 | # LLVM is not supported on PPC64 |
98 | # http://llvm.org/bugs/show_bug.cgi?id=3729 | |
99 | ExcludeArch: ppc64 | |
aa11c230 | 100 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
101 | ||
356a0bbd | 102 | %define _sysconfdir /etc/%{name} |
021b3c3d | 103 | |
9556f4c9 ER |
104 | %define specflags_ppc -fno-var-tracking-assignments |
105 | ||
6832a5c5 ER |
106 | # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ... |
107 | %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\) | |
108 | ||
aa11c230 | 109 | %description |
110 | LLVM is a compiler infrastructure designed for compile-time, | |
111 | link-time, runtime, and idle-time optimization of programs from | |
112 | arbitrary programming languages. LLVM is written in C++ and has been | |
113 | developed since 2000 at the University of Illinois and Apple. It | |
621ec11f JB |
114 | currently supports compilation of C and C++ programs using clang |
115 | frontend. | |
aa11c230 | 116 | |
2326a99f JB |
117 | %description -l pl.UTF-8 |
118 | LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji | |
119 | czasu kompilowania, linkowania, działania i bezczynności programów w | |
120 | dowolnych językach programowania. Jest napisana w C++, rozwijana od | |
121 | roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje | |
621ec11f | 122 | kompilację programów w C i C++ przy użyciu frontendu clang. |
2326a99f | 123 | |
8c514f23 JB |
124 | %package libs |
125 | Summary: LLVM shared library | |
126 | Summary(pl.UTF-8): Biblioteka współdzielona LLVM-a | |
127 | Group: Libraries | |
128 | Conflicts: llvm < 3.2 | |
129 | ||
130 | %description libs | |
131 | LLVM shared library. | |
132 | ||
133 | %description libs -l pl.UTF-8 | |
134 | Biblioteka współdzielona LLVM-a. | |
135 | ||
bc88141a | 136 | %package devel |
621ec11f JB |
137 | Summary: Static libraries and header files for LLVM |
138 | Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a | |
bc88141a | 139 | Group: Development/Languages |
8c514f23 | 140 | Requires: %{name}-libs = %{version}-%{release} |
bc88141a ER |
141 | Requires: libstdc++-devel >= 6:3.4 |
142 | ||
143 | %description devel | |
621ec11f JB |
144 | This package contains static libraries and header files needed to |
145 | develop new native programs that use the LLVM infrastructure. | |
146 | ||
147 | %description devel -l pl.UTF-8 | |
148 | Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe | |
149 | potrzebne do tworzenia nowych programów natywnych wykorzystujących | |
150 | infrastrukturę LLVM. | |
bc88141a | 151 | |
9556f4c9 ER |
152 | %package doc |
153 | Summary: Documentation for LLVM | |
621ec11f | 154 | Summary(pl.UTF-8): Dokumentacja do LLVM-a |
9556f4c9 ER |
155 | Group: Documentation |
156 | # does not require base | |
bc88141a | 157 | |
9556f4c9 ER |
158 | %description doc |
159 | Documentation for the LLVM compiler infrastructure. | |
bc88141a | 160 | |
621ec11f JB |
161 | %description doc -l pl.UTF-8 |
162 | Dokumentacja do infrastruktury kompilatorów LLVM. | |
163 | ||
9556f4c9 ER |
164 | %package apidocs |
165 | Summary: API documentation for LLVM | |
621ec11f | 166 | Summary(pl.UTF-8): Dokumentacja API LLVM-a |
9556f4c9 ER |
167 | Group: Development/Languages |
168 | Requires: %{name}-doc = %{version}-%{release} | |
bc88141a | 169 | |
9556f4c9 ER |
170 | %description apidocs |
171 | API documentation for the LLVM compiler infrastructure. | |
bc88141a | 172 | |
621ec11f JB |
173 | %description apidocs -l pl.UTF-8 |
174 | Dokumentacja API infrastruktury kompilatorów LLVM. | |
175 | ||
b0068ae4 JB |
176 | %package polly |
177 | Summary: Polyhedral optimizations for LLVM | |
178 | Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a | |
179 | Group: Development/Tools | |
180 | URL: http://polly.llvm.org/ | |
181 | Requires: %{name} = %{version}-%{release} | |
182 | ||
183 | %description polly | |
184 | Polly is a high-level loop and data-locality optimizer and | |
185 | optimization infrastructure for LLVM. It uses an abstract mathematical | |
186 | representation based on integer polyhedra to analyze and optimize the | |
187 | memory access pattern of a program. | |
188 | ||
189 | %description polly -l pl.UTF-8 | |
190 | Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do | |
191 | optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną | |
192 | reprezentację matematyczną opartą na wielościanach całkowitoliczbowych | |
193 | do analizy i optymalizacji wzorców dostępu do pamięci przez program. | |
194 | ||
195 | %package polly-devel | |
196 | Summary: Header files for LLVM Polly optimization infrastructure | |
197 | Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly | |
198 | Group: Development/Libraries | |
199 | URL: http://polly.llvm.org/ | |
200 | Requires: %{name}-devel = %{version}-%{release} | |
201 | Requires: %{name}-polly = %{version}-%{release} | |
202 | ||
203 | %description polly-devel | |
204 | Header files for LLVM Polly optimization infrastructure. | |
205 | ||
206 | %description polly-devel -l pl.UTF-8 | |
207 | Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly. | |
208 | ||
d997b14b AM |
209 | %package -n clang |
210 | Summary: A C language family frontend for LLVM | |
621ec11f | 211 | Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C |
d997b14b AM |
212 | License: NCSA |
213 | Group: Development/Languages | |
8c514f23 | 214 | Requires: %{name} = %{version}-%{release} |
d997b14b AM |
215 | |
216 | %description -n clang | |
217 | clang: noun 1. A loud, resonant, metallic sound. 2. The strident call | |
218 | of a crane or goose. 3. C-language family front-end toolkit. | |
219 | ||
220 | The goal of the Clang project is to create a new C, C++, Objective C | |
221 | and Objective C++ front-end for the LLVM compiler. Its tools are built | |
222 | as libraries and designed to be loosely-coupled and extendable. | |
223 | ||
621ec11f JB |
224 | %description -n clang -l pl.UTF-8 |
225 | clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2. | |
226 | piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków | |
227 | z rodziny C. | |
228 | ||
229 | Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora | |
230 | LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są | |
231 | budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu | |
232 | i rozszerzaniu. | |
233 | ||
d997b14b AM |
234 | %package -n clang-analyzer |
235 | Summary: A source code analysis framework | |
621ec11f | 236 | Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego |
d997b14b AM |
237 | License: NCSA |
238 | Group: Development/Languages | |
239 | Requires: clang = %{version}-%{release} | |
240 | # not picked up automatically since files are currently not instaled | |
241 | # in standard Python hierarchies yet | |
242 | Requires: python | |
243 | ||
244 | %description -n clang-analyzer | |
245 | The Clang Static Analyzer consists of both a source code analysis | |
246 | framework and a standalone tool that finds bugs in C and Objective-C | |
247 | programs. The standalone tool is invoked from the command-line, and is | |
248 | intended to run in tandem with a build of a project or code base. | |
249 | ||
621ec11f JB |
250 | %description -n clang-analyzer -l pl.UTF-8 |
251 | Clang Static Analyzer składa się ze szkieletu do analizy kodu | |
252 | źródłowego oraz samodzielnego narzędzia znajdującego błędy w | |
253 | programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z | |
254 | myślą o uruchamianiu wraz z kompilacją projektu lub kodu. | |
255 | ||
9556f4c9 | 256 | %package -n clang-devel |
621ec11f JB |
257 | Summary: Header files for Clang |
258 | Summary(pl.UTF-8): Pliki nagłówkowe Clanga | |
9556f4c9 | 259 | Group: Development/Languages |
8c514f23 | 260 | Requires: %{name}-devel = %{version}-%{release} |
9556f4c9 ER |
261 | Requires: clang = %{version}-%{release} |
262 | ||
263 | %description -n clang-devel | |
264 | This package contains header files for the Clang compiler. | |
265 | ||
621ec11f JB |
266 | %description -n clang-devel -l pl.UTF-8 |
267 | Ten pakiet zawiera pliki nagłówkowe kompilatora Clang. | |
268 | ||
9556f4c9 ER |
269 | %package -n clang-doc |
270 | Summary: Documentation for Clang | |
621ec11f | 271 | Summary(pl.UTF-8): Dokumentacja do Clanga |
9556f4c9 ER |
272 | Group: Documentation |
273 | Requires: %{name} = %{version}-%{release} | |
274 | ||
275 | %description -n clang-doc | |
276 | Documentation for the Clang compiler front-end. | |
277 | ||
621ec11f JB |
278 | %description -n clang-doc -l pl.UTF-8 |
279 | Dokumentacja do frontendu kompilatora Clang. | |
280 | ||
9556f4c9 ER |
281 | %package -n clang-apidocs |
282 | Summary: API documentation for Clang | |
621ec11f | 283 | Summary(pl.UTF-8): Dokumentacja API Clanga |
9556f4c9 ER |
284 | Group: Development/Languages |
285 | Requires: clang-doc = %{version}-%{release} | |
286 | ||
287 | %description -n clang-apidocs | |
288 | API documentation for the Clang compiler. | |
289 | ||
621ec11f JB |
290 | %description -n clang-apidocs -l pl.UTF-8 |
291 | Dokumentacja API kompilatora Clang. | |
292 | ||
b0068ae4 JB |
293 | %package -n clang-tools-extra |
294 | Summary: Extra tools for Clang | |
295 | Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang | |
296 | Group: Development/Tools | |
297 | URL: http://clang.llvm.org/docs/ClangTools.html | |
298 | Requires: clang = %{version}-%{release} | |
299 | ||
300 | %description -n clang-tools-extra | |
301 | Extra tools for Clang. | |
302 | ||
303 | %description -n clang-tools-extra -l pl.UTF-8 | |
304 | Dodatkowe narzędzia do kompilatora Clang. | |
305 | ||
ba1cf74d JB |
306 | %package -n lld |
307 | Summary: The LLVM linker | |
308 | Summary(pl.UTF-8): Konsolidator z projektu LLVM | |
309 | Group: Development/Libraries | |
310 | URL: http://lld.llvm.org/ | |
311 | Requires: %{name} = %{version}-%{release} | |
312 | ||
313 | %description -n lld | |
314 | lld is a new set of modular code for creating linker tools. | |
315 | ||
316 | %description -n lld -l pl.UTF-8 | |
317 | lld to nowy zbiór modularnego kodu do tworzenia narzędzi | |
318 | konsolidujących. | |
319 | ||
320 | %package -n lld-devel | |
321 | Summary: Development files for LLD linker tools | |
322 | Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD | |
323 | Group: Development/Tools | |
324 | URL: http://lld.llvm.org/ | |
325 | Requires: %{name}-devel = %{version}-%{release} | |
326 | ||
327 | %description -n lld-devel | |
328 | Development files for LLD linker tools. | |
329 | ||
330 | %description -n lld-devel -l pl.UTF-8 | |
331 | Pliki programistyczne narzędzi konsolidujących LLD. | |
332 | ||
5a7ac479 JB |
333 | %package -n lldb |
334 | Summary: Next generation high-performance debugger | |
335 | Summary(pl.UTF-8): Wydajny debugger nowej generacji | |
336 | Group: Development/Debuggers | |
ba1cf74d | 337 | URL: http://lldb.llvm.org/ |
5a7ac479 JB |
338 | Requires: %{name} = %{version}-%{release} |
339 | ||
340 | %description -n lldb | |
341 | LLDB is a next generation, high-performance debugger. It is built as a | |
342 | set of reusable components which highly leverage existing libraries in | |
343 | the larger LLVM Project, such as the Clang expression parser and LLVM | |
344 | disassembler. | |
345 | ||
346 | %description -n lldb -l pl.UTF-8 | |
347 | LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o | |
348 | komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki | |
349 | w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz | |
350 | disasembler LLVM. | |
351 | ||
352 | %package -n lldb-devel | |
ba1cf74d JB |
353 | Summary: Development files for LLDB debugger |
354 | Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB | |
5a7ac479 | 355 | Group: Development/Libraries |
ba1cf74d | 356 | URL: http://lldb.llvm.org/ |
5a7ac479 JB |
357 | Requires: %{name}-devel = %{version}-%{release} |
358 | Requires: clang-devel = %{version}-%{release} | |
359 | Requires: lldb = %{version}-%{release} | |
360 | ||
361 | %description -n lldb-devel | |
ba1cf74d | 362 | Development files for LLDB debugger. |
5a7ac479 JB |
363 | |
364 | %description -n lldb-devel -l pl.UTF-8 | |
ba1cf74d | 365 | Pliki programistyczne debuggera LLDB. |
5a7ac479 | 366 | |
9556f4c9 ER |
367 | %package ocaml |
368 | Summary: OCaml binding for LLVM | |
621ec11f JB |
369 | Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a |
370 | Group: Libraries | |
9556f4c9 ER |
371 | Requires: %{name} = %{version}-%{release} |
372 | %requires_eq ocaml-runtime | |
373 | ||
621ec11f | 374 | %description ocaml |
9556f4c9 ER |
375 | OCaml binding for LLVM. |
376 | ||
621ec11f JB |
377 | %description ocaml -l pl.UTF-8 |
378 | Wiązanie OCamla do LLVM-a. | |
379 | ||
9556f4c9 | 380 | %package ocaml-devel |
621ec11f JB |
381 | Summary: Development files for LLVM OCaml binding |
382 | Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a | |
9556f4c9 ER |
383 | Group: Development/Libraries |
384 | Requires: %{name}-devel = %{version}-%{release} | |
385 | Requires: %{name}-ocaml = %{version}-%{release} | |
386 | ||
387 | %description ocaml-devel | |
388 | The llvm-ocaml-devel package contains libraries and signature files | |
621ec11f JB |
389 | for developing applications that use llvm-ocaml binding. |
390 | ||
391 | %description ocaml-devel -l pl.UTF-8 | |
392 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
393 | wykorzystujących wiązanie llvm-ocaml. | |
394 | ||
9556f4c9 ER |
395 | %package ocaml-doc |
396 | Summary: Documentation for LLVM's OCaml binding | |
621ec11f | 397 | Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a |
9556f4c9 ER |
398 | Group: Documentation |
399 | Requires: %{name}-ocaml = %{version}-%{release} | |
400 | ||
401 | %description ocaml-doc | |
402 | HTML documentation for LLVM's OCaml binding. | |
403 | ||
621ec11f JB |
404 | %description ocaml-doc -l pl.UTF-8 |
405 | Dokumentacja HTML wiązania OCamla do LLVM-a. | |
406 | ||
aa11c230 | 407 | %prep |
ba1cf74d | 408 | %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6 |
c999855f | 409 | mv cfe-%{version}.src tools/clang |
b883cf1e JB |
410 | %{?with_rt:mv compiler-rt-%{version}.src projects/compiler-rt} |
411 | %{?with_lldb:mv lldb-%{version}.src tools/lldb} | |
412 | %{?with_polly:mv polly-%{version}.src tools/polly} | |
413 | mv clang-tools-extra-%{version}.src tools/clang/tools/extra | |
ba1cf74d | 414 | mv lld-%{version}.src tools/lld |
5a7ac479 | 415 | |
ebde279d JB |
416 | %patch0 -p1 |
417 | %patch1 -p1 | |
418 | %patch2 -p1 | |
3eca6fe9 | 419 | %{?with_polly:%patch3 -p1} |
64f4e87f JB |
420 | %if %{with lldb} |
421 | %patch4 -p1 | |
422 | %ifarch i386 i486 | |
ba1cf74d | 423 | %patch5 -p1 |
64f4e87f JB |
424 | %endif |
425 | %endif | |
426 | %patch6 -p1 | |
ce9cc204 | 427 | |
19f21eee | 428 | # configure does not properly specify libdir |
3a1d4bb3 | 429 | %{__sed} -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in |
9206c2b1 JB |
430 | # clang resources |
431 | %{__sed} -i 's|(PROJ_prefix)/lib/|(PROJ_prefix)/%{_lib}/|g' tools/clang/lib/Headers/Makefile | |
432 | %{__sed} -i 's|"lib"|"%{_lib}"|' tools/clang/lib/Driver/Driver.cpp | |
19f21eee | 433 | |
bacc8b96 ER |
434 | grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{ |
435 | s,^#!.*bin/env python,#!%{__python}, | |
436 | s,^#!.*bin/env perl,#!%{__perl}, | |
437 | }' | |
438 | ||
d756c460 | 439 | %build |
9556f4c9 | 440 | install -d obj |
d756c460 JB |
441 | %if "%{_lib}" != "lib" |
442 | # workaround for clang relative search paths building | |
443 | install -d obj/Release | |
444 | ln -snf lib obj/Release/%{_lib} | |
445 | %endif | |
aa11c230 | 446 | |
ebde279d JB |
447 | cd autoconf |
448 | %{__aclocal} -I m4 | |
449 | %{__autoconf} -o ../configure configure.ac | |
450 | cd .. | |
451 | %{__autoheader} -I autoconf -I autoconf/m4 autoconf/configure.ac | |
3eca6fe9 JB |
452 | %if %{with polly} |
453 | cd tools/polly/autoconf | |
454 | %{__aclocal} -I m4 -I ../../../autoconf/m4 | |
455 | %{__autoconf} -o ../configure configure.ac | |
456 | cd .. | |
457 | %{__autoheader} -I autoconf -I autoconf/m4 -I ../../../autoconf/m4 autoconf/configure.ac | |
458 | cd ../.. | |
459 | %endif | |
ebde279d | 460 | |
d997b14b | 461 | # Disabling assertions now, rec. by pure and needed for OpenGTL |
9556f4c9 | 462 | # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801 |
d997b14b | 463 | # |
bc88141a | 464 | # bash specific 'test a < b' |
9556f4c9 | 465 | cd obj |
d756c460 | 466 | CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64" |
d997b14b | 467 | bash ../%configure \ |
bc88141a | 468 | --datadir=%{_datadir}/%{name}-%{version} \ |
632f3287 | 469 | --disable-assertions \ |
5a7ac479 | 470 | --enable-cxx11 \ |
d997b14b | 471 | %ifarch %{ix86} |
632f3287 | 472 | --disable-pic \ |
9556f4c9 | 473 | %endif |
632f3287 JB |
474 | --disable-static \ |
475 | --enable-bindings=%{?with_ocaml:ocaml}%{!?with_ocaml:none} \ | |
476 | --enable-debug-runtime \ | |
9556f4c9 ER |
477 | %if %{with apidocs} |
478 | --enable-doxygen \ | |
d997b14b | 479 | %endif |
25189042 | 480 | --enable-experimental-targets=R600 \ |
bc88141a | 481 | --enable-jit \ |
aa11c230 | 482 | --enable-optimized \ |
bc88141a ER |
483 | --enable-shared \ |
484 | --with-pic | |
485 | ||
d997b14b | 486 | %{__make} \ |
1628dc68 | 487 | VERBOSE=1 \ |
0a0b7076 | 488 | REQUIRES_RTTI=1 \ |
d997b14b | 489 | OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}" |
aa11c230 | 490 | |
827664e9 | 491 | %if %{with tests} |
9556f4c9 ER |
492 | %{__make} check 2>&1 | tee llvm-testlog.txt |
493 | %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt | |
494 | %endif | |
495 | ||
dd9350c7 JB |
496 | cd .. |
497 | ||
b0068ae4 | 498 | %if %{with doc} |
dd9350c7 | 499 | %{__make} -C docs -f Makefile.sphinx man |
b0068ae4 | 500 | %{__make} -C tools/clang/tools/extra/docs html |
dd9350c7 JB |
501 | %endif |
502 | ||
aa11c230 | 503 | %install |
504 | rm -rf $RPM_BUILD_ROOT | |
9556f4c9 | 505 | %{__make} -C obj -j1 install \ |
d997b14b | 506 | PROJ_docsdir=/moredocs \ |
aa11c230 | 507 | DESTDIR=$RPM_BUILD_ROOT |
508 | ||
d997b14b | 509 | # Static analyzer not installed by default: |
9556f4c9 ER |
510 | # http://clang-analyzer.llvm.org/installation#OtherPlatforms |
511 | install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer | |
d997b14b AM |
512 | # create launchers |
513 | for f in scan-{build,view}; do | |
9556f4c9 ER |
514 | ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f |
515 | cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer | |
d997b14b | 516 | done |
dd9350c7 | 517 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
8132e62b JB |
518 | %py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view |
519 | %py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view | |
520 | %py_postclean %{_libdir}/clang-analyzer/scan-view | |
d997b14b | 521 | |
b0068ae4 | 522 | %if %{with doc} |
dd9350c7 JB |
523 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
524 | cp -p docs/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
b883cf1e JB |
525 | # these tools are not installed |
526 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1 | |
b0068ae4 JB |
527 | # make links |
528 | echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1 | |
dd9350c7 JB |
529 | %endif |
530 | ||
d997b14b | 531 | # Move documentation back to build directory |
d997b14b AM |
532 | rm -rf moredocs |
533 | mv $RPM_BUILD_ROOT/moredocs . | |
ebde279d JB |
534 | %{__rm} -v moredocs/*.tar.gz |
535 | %{__rm} -v moredocs/ocamldoc/html/*.tar.gz | |
9556f4c9 ER |
536 | |
537 | # and separate the apidoc | |
538 | %if %{with apidocs} | |
539 | rm -rf apidoc clang-apidoc | |
540 | mv moredocs/html/doxygen apidoc | |
541 | cp -a tools/clang/docs/doxygen/html clang-apidoc | |
542 | %endif | |
d997b14b AM |
543 | |
544 | # And prepare Clang documentation | |
d997b14b | 545 | rm -rf clang-docs |
9556f4c9 | 546 | install -d clang-docs |
827664e9 | 547 | for f in LICENSE.TXT NOTES.txt README.txt; do |
9556f4c9 | 548 | ln tools/clang/$f clang-docs |
d997b14b | 549 | done |
021b3c3d | 550 | |
6832a5c5 | 551 | # Get rid of erroneously installed example files. |
ebde279d | 552 | %{__rm} -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.* |
b883cf1e JB |
553 | # parts of test suite |
554 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{FileCheck,count,not} | |
ba1cf74d | 555 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/linker-script-test |
6832a5c5 | 556 | |
d997b14b AM |
557 | # remove documentation makefiles: |
558 | # they require the build directory to work | |
9556f4c9 ER |
559 | rm -rf moredocs/examples |
560 | cp -a examples moredocs/examples | |
561 | find moredocs/examples -name Makefile | xargs -0r rm -f | |
6832a5c5 | 562 | |
aa11c230 | 563 | %clean |
564 | rm -rf $RPM_BUILD_ROOT | |
565 | ||
8c514f23 JB |
566 | %post libs -p /sbin/ldconfig |
567 | %postun libs -p /sbin/ldconfig | |
aa11c230 | 568 | |
5a7ac479 JB |
569 | %post -n clang -p /sbin/ldconfig |
570 | %postun -n clang -p /sbin/ldconfig | |
571 | ||
572 | %post -n lldb -p /sbin/ldconfig | |
573 | %postun -n lldb -p /sbin/ldconfig | |
574 | ||
aa11c230 | 575 | %files |
576 | %defattr(644,root,root,755) | |
8132e62b | 577 | %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt} |
a9beeab5 | 578 | %attr(755,root,root) %{_bindir}/bugpoint |
a9beeab5 JB |
579 | %attr(755,root,root) %{_bindir}/llc |
580 | %attr(755,root,root) %{_bindir}/lli | |
11b6f380 | 581 | %attr(755,root,root) %{_bindir}/lli-child-target |
8132e62b JB |
582 | %attr(755,root,root) %{_bindir}/llvm-ar |
583 | %attr(755,root,root) %{_bindir}/llvm-as | |
584 | %attr(755,root,root) %{_bindir}/llvm-bcanalyzer | |
827664e9 | 585 | %attr(755,root,root) %{_bindir}/llvm-cov |
8132e62b JB |
586 | %attr(755,root,root) %{_bindir}/llvm-diff |
587 | %attr(755,root,root) %{_bindir}/llvm-dis | |
827664e9 | 588 | %attr(755,root,root) %{_bindir}/llvm-dwarfdump |
8132e62b | 589 | %attr(755,root,root) %{_bindir}/llvm-extract |
8132e62b JB |
590 | %attr(755,root,root) %{_bindir}/llvm-link |
591 | %attr(755,root,root) %{_bindir}/llvm-mc | |
dd9350c7 | 592 | %attr(755,root,root) %{_bindir}/llvm-mcmarkup |
8132e62b JB |
593 | %attr(755,root,root) %{_bindir}/llvm-nm |
594 | %attr(755,root,root) %{_bindir}/llvm-objdump | |
b883cf1e | 595 | %attr(755,root,root) %{_bindir}/llvm-profdata |
8132e62b | 596 | %attr(755,root,root) %{_bindir}/llvm-ranlib |
f981d747 | 597 | %attr(755,root,root) %{_bindir}/llvm-readobj |
827664e9 PS |
598 | %attr(755,root,root) %{_bindir}/llvm-rtdyld |
599 | %attr(755,root,root) %{_bindir}/llvm-size | |
f981d747 | 600 | %attr(755,root,root) %{_bindir}/llvm-stress |
1628dc68 | 601 | %attr(755,root,root) %{_bindir}/llvm-symbolizer |
827664e9 | 602 | %attr(755,root,root) %{_bindir}/llvm-tblgen |
a7973f21 | 603 | %attr(755,root,root) %{_bindir}/macho-dump |
8132e62b | 604 | %attr(755,root,root) %{_bindir}/opt |
b0068ae4 | 605 | %if %{with doc} |
a9beeab5 | 606 | %{_mandir}/man1/bugpoint.1* |
a7973f21 | 607 | %{_mandir}/man1/lit.1* |
a9beeab5 JB |
608 | %{_mandir}/man1/llc.1* |
609 | %{_mandir}/man1/lli.1* | |
8132e62b JB |
610 | %{_mandir}/man1/llvm-ar.1* |
611 | %{_mandir}/man1/llvm-as.1* | |
612 | %{_mandir}/man1/llvm-bcanalyzer.1* | |
f981d747 | 613 | %{_mandir}/man1/llvm-cov.1* |
8132e62b JB |
614 | %{_mandir}/man1/llvm-diff.1* |
615 | %{_mandir}/man1/llvm-dis.1* | |
b883cf1e | 616 | %{_mandir}/man1/llvm-dwarfdump.1* |
8132e62b | 617 | %{_mandir}/man1/llvm-extract.1* |
8132e62b JB |
618 | %{_mandir}/man1/llvm-link.1* |
619 | %{_mandir}/man1/llvm-nm.1* | |
b883cf1e | 620 | %{_mandir}/man1/llvm-profdata.1* |
8132e62b | 621 | %{_mandir}/man1/llvm-ranlib.1* |
c999855f | 622 | %{_mandir}/man1/llvm-readobj.1* |
f981d747 | 623 | %{_mandir}/man1/llvm-stress.1* |
1628dc68 | 624 | %{_mandir}/man1/llvm-symbolizer.1* |
a9beeab5 | 625 | %{_mandir}/man1/opt.1* |
dd9350c7 | 626 | %{_mandir}/man1/tblgen.1* |
b0068ae4 | 627 | %endif |
bc88141a | 628 | |
8c514f23 JB |
629 | %files libs |
630 | %defattr(644,root,root,755) | |
c999855f | 631 | %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so |
b883cf1e | 632 | %attr(755,root,root) %{_libdir}/libLLVM-3.5.so |
8c514f23 | 633 | |
bc88141a ER |
634 | %files devel |
635 | %defattr(644,root,root,755) | |
636 | %attr(755,root,root) %{_bindir}/llvm-config | |
8132e62b | 637 | %{_libdir}/libLLVM*.a |
1655c8b5 | 638 | %ifarch %{x8664} |
0a8510f2 | 639 | %attr(755,root,root) %{_libdir}/BugpointPasses.so |
19f21eee | 640 | %attr(755,root,root) %{_libdir}/libLTO.so |
8132e62b | 641 | %{_libdir}/libLTO.a |
1655c8b5 | 642 | %endif |
8132e62b JB |
643 | %{_includedir}/llvm |
644 | %{_includedir}/llvm-c | |
b883cf1e JB |
645 | %dir %{_datadir}/llvm |
646 | %{_datadir}/llvm/cmake | |
b0068ae4 | 647 | %if %{with doc} |
8132e62b | 648 | %{_mandir}/man1/llvm-config.1* |
b0068ae4 | 649 | %endif |
bc88141a | 650 | |
9556f4c9 ER |
651 | %files doc |
652 | %defattr(644,root,root,755) | |
653 | %doc moredocs/examples moredocs/html | |
654 | ||
655 | %if %{with apidocs} | |
656 | %files apidocs | |
657 | %defattr(644,root,root,755) | |
658 | %doc apidoc/* | |
659 | %endif | |
660 | ||
b0068ae4 JB |
661 | %if %{with polly} |
662 | %files polly | |
663 | %defattr(644,root,root,755) | |
664 | %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} | |
665 | %attr(755,root,root) %{_libdir}/LLVMPolly.so | |
666 | ||
667 | %files polly-devel | |
668 | %defattr(644,root,root,755) | |
b0068ae4 JB |
669 | %{_includedir}/polly |
670 | %endif | |
671 | ||
d997b14b | 672 | %files -n clang |
bc88141a | 673 | %defattr(644,root,root,755) |
827664e9 | 674 | %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt} |
dd9350c7 | 675 | %attr(755,root,root) %{_bindir}/c-index-test |
8132e62b JB |
676 | %attr(755,root,root) %{_bindir}/clang |
677 | %attr(755,root,root) %{_bindir}/clang++ | |
dd9350c7 | 678 | %attr(755,root,root) %{_bindir}/clang-check |
1628dc68 | 679 | %attr(755,root,root) %{_bindir}/clang-format |
827664e9 | 680 | %attr(755,root,root) %{_bindir}/clang-tblgen |
b3a27ca2 | 681 | %attr(755,root,root) %{_libdir}/libclang.so |
5a7ac479 JB |
682 | %dir %{_libdir}/clang |
683 | %dir %{_libdir}/clang/%{version} | |
684 | %{_libdir}/clang/%{version}/include | |
685 | %if %{with rt} | |
686 | %{_libdir}/clang/%{version}/lib | |
687 | %endif | |
8132e62b | 688 | %{_mandir}/man1/clang.1* |
d997b14b AM |
689 | |
690 | %files -n clang-analyzer | |
bc88141a | 691 | %defattr(644,root,root,755) |
d997b14b AM |
692 | %attr(755,root,root) %{_bindir}/scan-build |
693 | %attr(755,root,root) %{_bindir}/scan-view | |
dd9350c7 | 694 | %{_mandir}/man1/scan-build.1* |
ae49e501 | 695 | %dir %{_libdir}/clang-analyzer |
d997b14b | 696 | |
9556f4c9 ER |
697 | %dir %{_libdir}/clang-analyzer/scan-build |
698 | %{_libdir}/clang-analyzer/scan-build/*.css | |
699 | %{_libdir}/clang-analyzer/scan-build/*.js | |
700 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build | |
701 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer | |
702 | ||
8132e62b JB |
703 | %dir %{_libdir}/clang-analyzer/scan-view |
704 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view | |
705 | %{_libdir}/clang-analyzer/scan-view/Resources | |
706 | %{_libdir}/clang-analyzer/scan-view/*.py[co] | |
707 | ||
9556f4c9 ER |
708 | %files -n clang-devel |
709 | %defattr(644,root,root,755) | |
8132e62b | 710 | %{_libdir}/libclang*.a |
9556f4c9 ER |
711 | %{_includedir}/clang |
712 | %{_includedir}/clang-c | |
713 | ||
714 | %files -n clang-doc | |
715 | %defattr(644,root,root,755) | |
8132e62b | 716 | %doc tools/clang/docs/*.{css,html,png,txt} |
9556f4c9 ER |
717 | |
718 | %if %{with apidocs} | |
719 | %files -n clang-apidocs | |
720 | %defattr(644,root,root,755) | |
721 | %doc clang-apidoc/* | |
722 | %endif | |
723 | ||
b0068ae4 JB |
724 | %files -n clang-tools-extra |
725 | %defattr(644,root,root,755) | |
726 | %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt,docs/_build/html/{*.html,*.js,_static}} | |
727 | %attr(755,root,root) %{_bindir}/clang-apply-replacements | |
728 | %attr(755,root,root) %{_bindir}/clang-modernize | |
b883cf1e | 729 | %attr(755,root,root) %{_bindir}/clang-query |
b0068ae4 JB |
730 | %attr(755,root,root) %{_bindir}/clang-tidy |
731 | %attr(755,root,root) %{_bindir}/pp-trace | |
732 | %{_libdir}/libmodernizeCore.a | |
733 | ||
ba1cf74d JB |
734 | %files -n lld |
735 | %defattr(644,root,root,755) | |
736 | %doc tools/lld/{LICENSE.TXT,README.md} | |
737 | %attr(755,root,root) %{_bindir}/lld | |
738 | ||
739 | %files -n lld-devel | |
740 | %defattr(644,root,root,755) | |
741 | %{_libdir}/liblldCore.a | |
742 | %{_libdir}/liblldDriver.a | |
743 | %{_libdir}/liblldELF.a | |
744 | %{_libdir}/liblldMachO.a | |
745 | %{_libdir}/liblldNative.a | |
746 | %{_libdir}/liblldPECOFF.a | |
747 | %{_libdir}/liblldPasses.a | |
748 | %{_libdir}/liblldReaderWriter.a | |
749 | %{_libdir}/liblldYAML.a | |
750 | %{_libdir}/liblld*ELFTarget.a | |
751 | %{_includedir}/lld | |
752 | ||
5a7ac479 JB |
753 | %if %{with lldb} |
754 | %files -n lldb | |
755 | %defattr(644,root,root,755) | |
756 | %attr(755,root,root) %{_bindir}/lldb | |
b883cf1e JB |
757 | %attr(755,root,root) %{_bindir}/lldb-gdbserver |
758 | %attr(755,root,root) %{_bindir}/lldb-mi | |
5a7ac479 JB |
759 | %attr(755,root,root) %{_bindir}/lldb-platform |
760 | %attr(755,root,root) %{_libdir}/liblldb.so | |
b883cf1e JB |
761 | %dir %{py_sitedir}/lldb |
762 | %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so | |
763 | %attr(755,root,root) %{py_sitedir}/readline.so | |
5a7ac479 JB |
764 | |
765 | %files -n lldb-devel | |
766 | %defattr(644,root,root,755) | |
767 | %{_libdir}/liblldb*.a | |
768 | %{_includedir}/lldb | |
769 | %endif | |
770 | ||
9556f4c9 | 771 | %if %{with ocaml} |
d997b14b AM |
772 | %files ocaml |
773 | %defattr(644,root,root,755) | |
11b6f380 JB |
774 | %{_libdir}/ocaml/META.llvm* |
775 | %attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so | |
8132e62b JB |
776 | %{_libdir}/ocaml/llvm*.cma |
777 | %{_libdir}/ocaml/llvm*.cmi | |
d997b14b AM |
778 | |
779 | %files ocaml-devel | |
780 | %defattr(644,root,root,755) | |
bc8a0b58 | 781 | %{_libdir}/libllvm*.a |
8132e62b JB |
782 | %{_libdir}/ocaml/libLLVM*.a |
783 | %{_libdir}/ocaml/libllvm*.a | |
784 | %{_libdir}/ocaml/llvm*.a | |
785 | %{_libdir}/ocaml/llvm*.cmx* | |
786 | %{_libdir}/ocaml/llvm*.mli | |
9556f4c9 ER |
787 | |
788 | %files ocaml-doc | |
789 | %defattr(644,root,root,755) | |
790 | %doc moredocs/ocamldoc/html/* | |
791 | %endif |