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