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