]> git.pld-linux.org Git - packages/llvm.git/blob - llvm.spec
- updated included isl version
[packages/llvm.git] / llvm.spec
1 # TODO:
2 # - move and package:
3 #       %{_datadir}/clang/clang-format-sublime.py - sublime plugin
4 #       %{_datadir}/clang/clang-format.el - emacs mode
5 #       %{_datadir}/clang/clang-format.py - vim plugin
6 # - no content in doc package (it used to contain parts of clang apidocs and some examples)
7 # - system isl in polly?
8 #
9 # Conditional build:
10 %bcond_without  lldb            # LLDB debugger
11 %bcond_without  polly           # Polly cache-locality optimization, auto-parallelism and vectorization
12 %bcond_without  rt              # compiler-rt libraries
13 %bcond_without  multilib        # compiler-rt multilib libraries
14 %bcond_without  ocaml           # OCaml binding
15 %bcond_without  doc             # HTML docs and man pages
16 %bcond_with     apidocs         # doxygen docs (HUGE, so they are not built by default)
17 %bcond_with     tests           # run tests
18
19 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
20 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
21 %undefine       with_ocaml
22 %endif
23
24 Summary:        The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
25 Summary(pl.UTF-8):      Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
26 Name:           llvm
27 Version:        3.9.0
28 Release:        1
29 License:        University of Illinois/NCSA Open Source License
30 Group:          Development/Languages
31 #Source0Download: http://llvm.org/releases/download.html
32 Source0:        http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
33 # Source0-md5:  f2093e98060532449eb7d2fcfd0bc6c6
34 Source1:        http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
35 # Source1-md5:  29e1d86bee422ab5345f5e9fb808d2dc
36 Source2:        http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
37 # Source2-md5:  b7ea34c9d744da16ffc0217b6990d095
38 Source3:        http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
39 # Source3-md5:  968d053c3c3d7297983589164c6999e9
40 Source4:        http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz
41 # Source4-md5:  1cf328cbae25267749b68cfa6f113674
42 Source5:        http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
43 # Source5-md5:  f4f663068c77fc742113211841e94d5e
44 Source6:        http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz
45 # Source6-md5:  c23c895c0d855a0dc426af686538a95e
46 Patch0:         %{name}-lld-link.patch
47 Patch1:         %{name}-pld.patch
48 Patch2:         libdir.patch
49 Patch3:         x32-gcc-toolchain.patch
50 Patch4:         cmake-buildtype.patch
51 Patch5:         %{name}-ocaml-shared.patch
52 URL:            http://llvm.org/
53 BuildRequires:  bash
54 BuildRequires:  bison
55 BuildRequires:  cmake >= 3.4.3
56 BuildRequires:  flex
57 BuildRequires:  gcc >= 5:3.4
58 # gcc4 might be installed, but not current __cc
59 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
60 BuildRequires:  __cc >= 3.4
61 %endif
62 %ifarch x32
63 BuildRequires:  glibc-devel(x86_64)
64 %endif
65 BuildRequires:  groff
66 BuildRequires:  libedit-devel
67 BuildRequires:  libltdl-devel
68 BuildRequires:  libstdc++-devel >= 5:3.4
69 BuildRequires:  ncurses-devel
70 %if %{with ocaml}
71 BuildRequires:  ocaml-ctypes-devel >= 0.4
72 BuildRequires:  ocaml-findlib
73 BuildRequires:  ocaml-ocamldoc
74 BuildRequires:  ocaml-ounit
75 %endif
76 BuildRequires:  perl-base >= 1:5.6
77 BuildRequires:  perl-tools-pod
78 BuildRequires:  python >= 1:2.7
79 BuildRequires:  rpm-pythonprov
80 %{?with_doc:BuildRequires:      sphinx-pdg}
81 BuildRequires:  tar >= 1:1.22
82 BuildRequires:  xz
83 BuildRequires:  zlib-devel
84 %if %{with apidocs}
85 BuildRequires:  doxygen
86 BuildRequires:  graphviz
87 %endif
88 %if %{with tests}
89 BuildRequires:  dejagnu
90 BuildRequires:  tcl-devel
91 %endif
92 %if %{with rt} && %{with multilib}
93 %ifarch %{x8664}
94 BuildRequires:  gcc-c++-multilib-32
95 BuildRequires:  libstdc++-multilib-32-devel
96 %endif
97 %ifarch x32
98 BuildRequires: gcc-c++-multilib-32
99 BuildRequires: libstdc++-multilib-32-devel
100 BuildRequires: gcc-c++-multilib-64
101 BuildRequires: libstdc++-multilib-64-devel
102 %endif
103 %endif
104 %if %{with lldb}
105 BuildRequires:  epydoc
106 %ifarch i386 i486
107 BuildRequires:  libatomic-devel
108 %endif
109 BuildRequires:  libxml2-devel >= 2
110 BuildRequires:  ncurses-ext-devel
111 BuildRequires:  python-devel >= 2
112 BuildRequires:  swig-python
113 %endif
114 %if %{with polly}
115 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
116 # private copy in polly/lib/External/isl
117 #BuildRequires: isl-devel >= 0.17.1
118 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
119 %endif
120 %if %{with ocaml}
121 BuildConflicts: llvm-ocaml
122 %endif
123 Requires:       %{name}-libs = %{version}-%{release}
124 # LLVM is not supported on PPC64
125 # http://llvm.org/bugs/show_bug.cgi?id=3729
126 ExcludeArch:    ppc64
127 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128
129 %define         abi     3.9
130 %define         _sysconfdir     /etc/%{name}
131
132 %define         specflags_ppc   -fno-var-tracking-assignments
133 # x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
134 %define         specflags_x32   -gsplit-dwarf
135
136 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
137 %define         _noautostrip    .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
138
139 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
140 # -Werror=format-security is for swig
141 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
142 %define         filterout_c     -fvar-tracking-assignments
143 %define         filterout_cxx   -fvar-tracking-assignments -Werror=format-security
144 %define         filterout_ccpp  -fvar-tracking-assignments
145
146 # std::__once_call, std::__once_callable non-function symbols
147 %define         skip_post_check_so      liblldb.so.*
148
149 %description
150 LLVM is a compiler infrastructure designed for compile-time,
151 link-time, runtime, and idle-time optimization of programs from
152 arbitrary programming languages. LLVM is written in C++ and has been
153 developed since 2000 at the University of Illinois and Apple. It
154 currently supports compilation of C and C++ programs using clang
155 frontend.
156
157 %description -l pl.UTF-8
158 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
159 czasu kompilowania, linkowania, działania i bezczynności programów w
160 dowolnych językach programowania. Jest napisana w C++, rozwijana od
161 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
162 kompilację programów w C i C++ przy użyciu frontendu clang.
163
164 %package libs
165 Summary:        LLVM shared libraries
166 Summary(pl.UTF-8):      Biblioteki współdzielone LLVM-a
167 Group:          Libraries
168 Conflicts:      llvm < 3.2
169
170 %description libs
171 LLVM shared libraries.
172
173 %description libs -l pl.UTF-8
174 Biblioteki współdzielone LLVM-a.
175
176 %package devel
177 Summary:        Static libraries and header files for LLVM
178 Summary(pl.UTF-8):      Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
179 Group:          Development/Languages
180 Requires:       %{name}-libs = %{version}-%{release}
181 Requires:       libstdc++-devel >= 6:3.4
182
183 %description devel
184 This package contains static libraries and header files needed to
185 develop new native programs that use the LLVM infrastructure.
186
187 %description devel -l pl.UTF-8
188 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
189 potrzebne do tworzenia nowych programów natywnych wykorzystujących
190 infrastrukturę LLVM.
191
192 %package doc
193 Summary:        Documentation for LLVM
194 Summary(pl.UTF-8):      Dokumentacja do LLVM-a
195 Group:          Documentation
196 # does not require base
197
198 %description doc
199 Documentation for the LLVM compiler infrastructure.
200
201 %description doc -l pl.UTF-8
202 Dokumentacja do infrastruktury kompilatorów LLVM.
203
204 %package apidocs
205 Summary:        API documentation for LLVM
206 Summary(pl.UTF-8):      Dokumentacja API LLVM-a
207 Group:          Development/Languages
208 Requires:       %{name}-doc = %{version}-%{release}
209
210 %description apidocs
211 API documentation for the LLVM compiler infrastructure.
212
213 %description apidocs -l pl.UTF-8
214 Dokumentacja API infrastruktury kompilatorów LLVM.
215
216 %package polly
217 Summary:        Polyhedral optimizations for LLVM
218 Summary(pl.UTF-8):      Optymalizacje wielościanowe dla LLVM-a
219 Group:          Development/Tools
220 URL:            http://polly.llvm.org/
221 Requires:       %{name} = %{version}-%{release}
222
223 %description polly
224 Polly is a high-level loop and data-locality optimizer and
225 optimization infrastructure for LLVM. It uses an abstract mathematical
226 representation based on integer polyhedra to analyze and optimize the
227 memory access pattern of a program.
228
229 %description polly -l pl.UTF-8
230 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
231 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
232 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
233 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
234
235 %package polly-devel
236 Summary:        Header files for LLVM Polly optimization infrastructure
237 Summary(pl.UTF-8):      Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
238 Group:          Development/Libraries
239 URL:            http://polly.llvm.org/
240 Requires:       %{name}-devel = %{version}-%{release}
241 Requires:       %{name}-polly = %{version}-%{release}
242
243 %description polly-devel
244 Header files for LLVM Polly optimization infrastructure.
245
246 %description polly-devel -l pl.UTF-8
247 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
248
249 %package -n clang
250 Summary:        A C language family frontend for LLVM
251 Summary(pl.UTF-8):      Frontend LLVM-a do języków z rodziny C
252 License:        NCSA
253 Group:          Development/Languages
254 Requires:       %{name} = %{version}-%{release}
255 Requires:       clang-libs = %{version}-%{release}
256
257 %description -n clang
258 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
259 of a crane or goose. 3. C-language family front-end toolkit.
260
261 The goal of the Clang project is to create a new C, C++, Objective C
262 and Objective C++ front-end for the LLVM compiler. Its tools are built
263 as libraries and designed to be loosely-coupled and extendable.
264
265 %description -n clang -l pl.UTF-8
266 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
267 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
268 z rodziny C.
269
270 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
271 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
272 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
273 i rozszerzaniu.
274
275 %package -n clang-libs
276 Summary:        Clang shared libraries
277 Summary(pl.UTF-8):      Biblioteki współdzielone Clanga
278 Group:          Libraries
279
280 %description -n clang-libs
281 Clang shared libraries.
282
283 %description -n clang-libs -l pl.UTF-8
284 Biblioteki współdzielone Clanga.
285
286 %package -n clang-multilib
287 Summary:        A C language family frontend for LLVM - 32-bit support
288 Summary(pl.UTF-8):      Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
289 License:        NCSA
290 Group:          Development/Languages
291 Requires:       clang = %{version}-%{release}
292
293 %description -n clang-multilib
294 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
295 of a crane or goose. 3. C-language family front-end toolkit.
296
297 The goal of the Clang project is to create a new C, C++, Objective C
298 and Objective C++ front-end for the LLVM compiler. Its tools are built
299 as libraries and designed to be loosely-coupled and extendable.
300
301 This package contains the C compiler support for producing 32-bit
302 programs on 64-bit host.
303
304 %description -n clang-multilib -l pl.UTF-8
305 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
306 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
307 z rodziny C.
308
309 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
310 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
311 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
312 i rozszerzaniu.
313
314 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
315 programów 32-bitowych na maszynie 64-bitowej.
316
317 %package -n clang-analyzer
318 Summary:        A source code analysis framework
319 Summary(pl.UTF-8):      Szkielet do analizy kodu źródłowego
320 License:        NCSA
321 Group:          Development/Languages
322 Requires:       clang = %{version}-%{release}
323 # not picked up automatically since files are currently not instaled
324 # in standard Python hierarchies yet
325 Requires:       python
326
327 %description -n clang-analyzer
328 The Clang Static Analyzer consists of both a source code analysis
329 framework and a standalone tool that finds bugs in C and Objective-C
330 programs. The standalone tool is invoked from the command-line, and is
331 intended to run in tandem with a build of a project or code base.
332
333 %description -n clang-analyzer -l pl.UTF-8
334 Clang Static Analyzer składa się ze szkieletu do analizy kodu
335 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
336 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
337 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
338
339 %package -n clang-devel
340 Summary:        Header files for Clang
341 Summary(pl.UTF-8):      Pliki nagłówkowe Clanga
342 Group:          Development/Languages
343 Requires:       %{name}-devel = %{version}-%{release}
344 Requires:       clang = %{version}-%{release}
345
346 %description -n clang-devel
347 This package contains header files for the Clang compiler.
348
349 %description -n clang-devel -l pl.UTF-8
350 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
351
352 %package -n clang-doc
353 Summary:        Documentation for Clang
354 Summary(pl.UTF-8):      Dokumentacja do Clanga
355 Group:          Documentation
356 Requires:       %{name} = %{version}-%{release}
357
358 %description -n clang-doc
359 Documentation for the Clang compiler front-end.
360
361 %description -n clang-doc -l pl.UTF-8
362 Dokumentacja do frontendu kompilatora Clang.
363
364 %package -n clang-apidocs
365 Summary:        API documentation for Clang
366 Summary(pl.UTF-8):      Dokumentacja API Clanga
367 Group:          Development/Languages
368 Requires:       clang-doc = %{version}-%{release}
369
370 %description -n clang-apidocs
371 API documentation for the Clang compiler.
372
373 %description -n clang-apidocs -l pl.UTF-8
374 Dokumentacja API kompilatora Clang.
375
376 %package -n clang-tools-extra
377 Summary:        Extra tools for Clang
378 Summary(pl.UTF-8):      Dodatkowe narzędzia do kompilatora Clang
379 Group:          Development/Tools
380 URL:            http://clang.llvm.org/docs/ClangTools.html
381 Requires:       clang = %{version}-%{release}
382
383 %description -n clang-tools-extra
384 Extra tools for Clang.
385
386 %description -n clang-tools-extra -l pl.UTF-8
387 Dodatkowe narzędzia do kompilatora Clang.
388
389 %package -n lld
390 Summary:        The LLVM linker
391 Summary(pl.UTF-8):      Konsolidator z projektu LLVM
392 Group:          Development/Libraries
393 URL:            http://lld.llvm.org/
394 Requires:       %{name} = %{version}-%{release}
395
396 %description -n lld
397 lld is a new set of modular code for creating linker tools.
398
399 %description -n lld -l pl.UTF-8
400 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
401 konsolidujących.
402
403 %package -n lld-devel
404 Summary:        Development files for LLD linker tools
405 Summary(pl.UTF-8):      Pliki programistyczne narzędzi konsolidujących LLD
406 Group:          Development/Tools
407 URL:            http://lld.llvm.org/
408 Requires:       %{name}-devel = %{version}-%{release}
409
410 %description -n lld-devel
411 Development files for LLD linker tools.
412
413 %description -n lld-devel -l pl.UTF-8
414 Pliki programistyczne narzędzi konsolidujących LLD.
415
416 %package -n lldb
417 Summary:        Next generation high-performance debugger
418 Summary(pl.UTF-8):      Wydajny debugger nowej generacji
419 Group:          Development/Debuggers
420 URL:            http://lldb.llvm.org/
421 Requires:       %{name} = %{version}-%{release}
422 Requires:       python-six
423
424 %description -n lldb
425 LLDB is a next generation, high-performance debugger. It is built as a
426 set of reusable components which highly leverage existing libraries in
427 the larger LLVM Project, such as the Clang expression parser and LLVM
428 disassembler.
429
430 %description -n lldb -l pl.UTF-8
431 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
432 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
433 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
434 disasembler LLVM.
435
436 %package -n lldb-devel
437 Summary:        Development files for LLDB debugger
438 Summary(pl.UTF-8):      Pliki programistyczne debuggera LLDB
439 Group:          Development/Libraries
440 URL:            http://lldb.llvm.org/
441 Requires:       %{name}-devel = %{version}-%{release}
442 Requires:       clang-devel = %{version}-%{release}
443 Requires:       lldb = %{version}-%{release}
444
445 %description -n lldb-devel
446 Development files for LLDB debugger.
447
448 %description -n lldb-devel -l pl.UTF-8
449 Pliki programistyczne debuggera LLDB.
450
451 %package ocaml
452 Summary:        OCaml binding for LLVM
453 Summary(pl.UTF-8):      Wiązanie OCamla do LLVM-a
454 Group:          Libraries
455 Requires:       %{name} = %{version}-%{release}
456 %if %{with ocaml}
457 %requires_eq    ocaml-runtime
458 %endif
459
460 %description ocaml
461 OCaml binding for LLVM.
462
463 %description ocaml -l pl.UTF-8
464 Wiązanie OCamla do LLVM-a.
465
466 %package ocaml-devel
467 Summary:        Development files for LLVM OCaml binding
468 Summary(pl.UTF-8):      Pliki programistyczne wiązania OCamla do LLVM-a
469 Group:          Development/Libraries
470 Requires:       %{name}-devel = %{version}-%{release}
471 Requires:       %{name}-ocaml = %{version}-%{release}
472
473 %description ocaml-devel
474 The llvm-ocaml-devel package contains libraries and signature files
475 for developing applications that use llvm-ocaml binding.
476
477 %description ocaml-devel -l pl.UTF-8
478 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
479 wykorzystujących wiązanie llvm-ocaml.
480
481 %package ocaml-doc
482 Summary:        Documentation for LLVM's OCaml binding
483 Summary(pl.UTF-8):      Dokumentacja wiązania OCamla do LLVM-a
484 Group:          Documentation
485 Requires:       %{name}-ocaml = %{version}-%{release}
486
487 %description ocaml-doc
488 HTML documentation for LLVM's OCaml binding.
489
490 %description ocaml-doc -l pl.UTF-8
491 Dokumentacja HTML wiązania OCamla do LLVM-a.
492
493 %prep
494 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
495 %{__mv} cfe-%{version}.src tools/clang
496 %{?with_rt:mv compiler-rt-%{version}.src projects/compiler-rt}
497 %{?with_lldb:mv lldb-%{version}.src tools/lldb}
498 %{?with_polly:mv polly-%{version}.src tools/polly}
499 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
500 %{__mv} lld-%{version}.src tools/lld
501
502 %patch0 -p1
503 %patch1 -p1
504 %patch2 -p1
505 %patch3 -p1
506 %patch4 -p1
507 %patch5 -p1
508
509 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
510         s,^#!.*bin/env python,#!%{__python},
511         s,^#!.*bin/env perl,#!%{__perl},
512 }'
513
514 %build
515 install -d build
516
517 # Disabling assertions now, rec. by pure and needed for OpenGTL
518 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
519 cd build
520 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
521
522 %cmake \
523 %ifarch %{x8664}
524         -DLLVM_LIBDIR_SUFFIX:STRING=64 \
525 %endif
526 %ifarch x32
527         -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
528 %endif
529 %if %{with apidocs}
530         -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
531 %endif
532 %if %{with doc}
533         -DLLVM_ENABLE_SPHINX:BOOL=ON \
534         -DSPHINX_WARNINGS_AS_ERRORS=OFF \
535 %endif
536         -DLLVM_ENABLE_PIC:BOOL=ON \
537         -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
538         -DLLVM_ENABLE_CXX1Y:BOOL=ON \
539         -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
540         -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
541         -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
542         -DBUILD_SHARED_LIBS:BOOL=OFF \
543         -DENABLE_LINKER_BUILD_ID:BOOL=ON \
544         ../
545
546 %{__make} \
547         VERBOSE=1 \
548         REQUIRES_RTTI=1 \
549         OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
550
551 %if %{with tests}
552 %{__make} check 2>&1 | tee llvm-testlog.txt
553 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
554 %endif
555
556 %if %{with doc}
557 %{__make} -C docs docs-llvm-html
558 %{__make} -C docs docs-llvm-man
559 %if %{with ocaml}
560 %{__make} -C docs ocaml_doc
561 %endif
562 %{__make} -C tools/clang/docs docs-clang-html
563 %{__make} -C tools/clang/docs docs-clang-man
564 %{__make} -C tools/lld/docs docs-lld-html
565 %{__make} -C tools/lldb/docs lldb-python-doc
566 %{__make} -C tools/lldb/docs lldb-cpp-doc
567 %endif
568
569 %install
570 rm -rf $RPM_BUILD_ROOT
571 %{__make} -C build install \
572         DESTDIR=$RPM_BUILD_ROOT
573
574 # only some .pyc files are created by make install
575 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
576 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
577
578 # Adjust static analyzer installation
579 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
580 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
581 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
582 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
583 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
584 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
585 %py_postclean %{_datadir}/scan-view
586
587 # not installed by cmake buildsystem
588 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
589
590 %if %{with doc}
591 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
592 # these tools are not installed
593 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
594 # make links
595 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
596 %endif
597
598 # Move documentation back to build directory
599 %if %{with ocaml}
600 rm -rf ocamldocs
601 %{__mv} $RPM_BUILD_ROOT%{_prefix}/docs/ocaml/html/html ocamldocs
602 %endif
603
604 # and separate the apidoc
605 %if %{with apidocs}
606 rm -rf clang-apidoc
607 cp -a build/tools/clang/docs/html clang-apidoc
608 %endif
609
610 # And prepare Clang documentation
611 rm -rf clang-docs
612 install -d clang-docs
613 for f in LICENSE.TXT NOTES.txt README.txt; do
614         ln tools/clang/$f clang-docs
615 done
616
617 # Get rid of erroneously installed example files.
618 %{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
619 # test?
620 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
621 # not this OS
622 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
623 # use system six
624 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
625 # it seems it is used internally by an extra clang tool
626 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
627
628 %clean
629 rm -rf $RPM_BUILD_ROOT
630
631 %post   libs -p /sbin/ldconfig
632 %postun libs -p /sbin/ldconfig
633
634 %post   -n clang -p /sbin/ldconfig
635 %postun -n clang -p /sbin/ldconfig
636
637 %post   -n lldb -p /sbin/ldconfig
638 %postun -n lldb -p /sbin/ldconfig
639
640 %files
641 %defattr(644,root,root,755)
642 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
643 %attr(755,root,root) %{_bindir}/bugpoint
644 %attr(755,root,root) %{_bindir}/llc
645 %attr(755,root,root) %{_bindir}/lli
646 %attr(755,root,root) %{_bindir}/llvm-ar
647 %attr(755,root,root) %{_bindir}/llvm-as
648 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
649 %attr(755,root,root) %{_bindir}/llvm-cov
650 %attr(755,root,root) %{_bindir}/llvm-diff
651 %attr(755,root,root) %{_bindir}/llvm-dis
652 %attr(755,root,root) %{_bindir}/llvm-dsymutil
653 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
654 %attr(755,root,root) %{_bindir}/llvm-dwp
655 %attr(755,root,root) %{_bindir}/llvm-extract
656 %attr(755,root,root) %{_bindir}/llvm-lib
657 %attr(755,root,root) %{_bindir}/llvm-link
658 %attr(755,root,root) %{_bindir}/llvm-lto
659 %attr(755,root,root) %{_bindir}/llvm-mc
660 %attr(755,root,root) %{_bindir}/llvm-mcmarkup
661 %attr(755,root,root) %{_bindir}/llvm-nm
662 %attr(755,root,root) %{_bindir}/llvm-objdump
663 %attr(755,root,root) %{_bindir}/llvm-profdata
664 %attr(755,root,root) %{_bindir}/llvm-ranlib
665 %attr(755,root,root) %{_bindir}/llvm-readobj
666 %attr(755,root,root) %{_bindir}/llvm-rtdyld
667 %attr(755,root,root) %{_bindir}/llvm-size
668 %attr(755,root,root) %{_bindir}/llvm-split
669 %attr(755,root,root) %{_bindir}/llvm-stress
670 %attr(755,root,root) %{_bindir}/llvm-symbolizer
671 %attr(755,root,root) %{_bindir}/llvm-tblgen
672 %attr(755,root,root) %{_bindir}/llvm-cxxdump
673 %attr(755,root,root) %{_bindir}/llvm-pdbdump
674 %attr(755,root,root) %{_bindir}/obj2yaml
675 %attr(755,root,root) %{_bindir}/opt
676 %attr(755,root,root) %{_bindir}/sancov
677 %attr(755,root,root) %{_bindir}/sanstats
678 %attr(755,root,root) %{_bindir}/verify-uselistorder
679 %attr(755,root,root) %{_bindir}/yaml2obj
680 %if %{with doc}
681 %{_mandir}/man1/bugpoint.1*
682 %{_mandir}/man1/lit.1*
683 %{_mandir}/man1/llc.1*
684 %{_mandir}/man1/lli.1*
685 %{_mandir}/man1/llvm-ar.1*
686 %{_mandir}/man1/llvm-as.1*
687 %{_mandir}/man1/llvm-bcanalyzer.1*
688 %{_mandir}/man1/llvm-cov.1*
689 %{_mandir}/man1/llvm-diff.1*
690 %{_mandir}/man1/llvm-dis.1*
691 %{_mandir}/man1/llvm-dwarfdump.1*
692 %{_mandir}/man1/llvm-extract.1*
693 %{_mandir}/man1/llvm-lib.1*
694 %{_mandir}/man1/llvm-link.1*
695 %{_mandir}/man1/llvm-nm.1*
696 %{_mandir}/man1/llvm-profdata.1*
697 %{_mandir}/man1/llvm-ranlib.1*
698 %{_mandir}/man1/llvm-readobj.1*
699 %{_mandir}/man1/llvm-stress.1*
700 %{_mandir}/man1/llvm-symbolizer.1*
701 %{_mandir}/man1/opt.1*
702 %{_mandir}/man1/tblgen.1*
703 %endif
704
705 %files libs
706 %defattr(644,root,root,755)
707 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
708 # non-soname symlink
709 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
710 %attr(755,root,root) %{_libdir}/libLTO.so
711
712 %files devel
713 %defattr(644,root,root,755)
714 %attr(755,root,root) %{_bindir}/llvm-config
715 %attr(755,root,root) %{_libdir}/libLLVM.so
716 %attr(755,root,root) %{_libdir}/BugpointPasses.so
717 %{_libdir}/libLLVM*.a
718 %{_includedir}/llvm
719 %{_includedir}/llvm-c
720 %{_libdir}/cmake/llvm
721 %if %{with doc}
722 %{_mandir}/man1/llvm-config.1*
723 %endif
724
725 #%files doc
726 #%defattr(644,root,root,755)
727
728 %if %{with apidocs}
729 %files apidocs
730 %defattr(644,root,root,755)
731 %doc apidoc/*
732 %endif
733
734 %if %{with polly}
735 %files polly
736 %defattr(644,root,root,755)
737 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
738 %attr(755,root,root) %{_libdir}/LLVMPolly.so
739
740 %files polly-devel
741 %defattr(644,root,root,755)
742 %{_libdir}/libPolly.a
743 %{_libdir}/libPollyISL.a
744 %{_libdir}/libPollyPPCG.a
745 %{_includedir}/polly
746 %endif
747
748 %files -n clang
749 %defattr(644,root,root,755)
750 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
751 %attr(755,root,root) %{_bindir}/clang
752 %attr(755,root,root) %{_bindir}/clang++
753 %attr(755,root,root) %{_bindir}/clang-%{abi}
754 %attr(755,root,root) %{_bindir}/clang-check
755 %attr(755,root,root) %{_bindir}/clang-cl
756 %attr(755,root,root) %{_bindir}/clang-format
757 %attr(755,root,root) %{_bindir}/git-clang-format
758 %dir %{_libdir}/clang
759 %dir %{_libdir}/clang/%{version}
760 %{_libdir}/clang/%{version}/include
761 %if %{with rt}
762 %ifarch %{ix86} %{x8664} x32
763 %dir %{_libdir}/clang/%{version}/lib
764 %dir %{_libdir}/clang/%{version}/lib/linux
765 %endif
766 %ifarch %{ix86}
767 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
768 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
769 %endif
770 %ifarch %{x8664}
771 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
772 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
773 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
774 %endif
775 %ifarch %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 ppc64
776 %{_libdir}/clang/%{version}/asan_blacklist.txt
777 %endif
778 %ifarch %{ix86} %{x8664} x32 mips64
779 %{_libdir}/clang/%{version}/cfi_blacklist.txt
780 %endif
781 %ifarch %{x8664} x32 aarch64 mips64
782 %{_libdir}/clang/%{version}/dfsan_abilist.txt
783 %{_libdir}/clang/%{version}/msan_blacklist.txt
784 %endif
785 %endif
786 %dir %{_datadir}/clang
787 %{_datadir}/clang/clang-format-diff.py
788
789 %files -n clang-libs
790 %defattr(644,root,root,755)
791 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
792
793 %if %{with rt} && %{with multilib}
794 %ifarch %{x8664} x32
795 %files -n clang-multilib
796 %defattr(644,root,root,755)
797 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
798 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
799 %endif
800 %ifarch x32
801 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
802 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
803 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
804 %endif
805 %endif
806
807 %files -n clang-analyzer
808 %defattr(644,root,root,755)
809 %attr(755,root,root) %{_bindir}/scan-build
810 %attr(755,root,root) %{_bindir}/scan-view
811 %{_datadir}/scan-build
812 %{_datadir}/scan-view
813 %{_mandir}/man1/scan-build.1*
814 %dir %{_libdir}/scan-build
815 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
816 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
817
818 %files -n clang-devel
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_libdir}/libclang.so
821 %{_libdir}/libclang*.a
822 %{_includedir}/clang
823 %{_includedir}/clang-c
824 %{_libdir}/cmake/clang
825
826 %files -n clang-doc
827 %defattr(644,root,root,755)
828 %doc tools/clang/docs/*.{html,png,txt}
829
830 %if %{with apidocs}
831 %files -n clang-apidocs
832 %defattr(644,root,root,755)
833 %doc clang-apidoc/*
834 %endif
835
836 %files -n clang-tools-extra
837 %defattr(644,root,root,755)
838 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
839 %attr(755,root,root) %{_bindir}/clang-apply-replacements
840 %attr(755,root,root) %{_bindir}/clang-include-fixer
841 %attr(755,root,root) %{_bindir}/clang-query
842 %attr(755,root,root) %{_bindir}/clang-rename
843 %attr(755,root,root) %{_bindir}/clang-tidy
844 %attr(755,root,root) %{_bindir}/find-all-symbols
845 %attr(755,root,root) %{_bindir}/modularize
846 %attr(755,root,root) %{_bindir}/pp-trace
847 %{_datadir}/clang/clang-include-fixer.py
848 %{_datadir}/clang/clang-tidy-diff.py
849 %{_datadir}/clang/run-clang-tidy.py
850 %{_datadir}/clang/run-find-all-symbols.py
851
852 %files -n lld
853 %defattr(644,root,root,755)
854 %doc tools/lld/{LICENSE.TXT,README.md}
855 %attr(755,root,root) %{_bindir}/ld.lld
856 %attr(755,root,root) %{_bindir}/lld
857 %attr(755,root,root) %{_bindir}/lld-link
858
859 %files -n lld-devel
860 %defattr(644,root,root,755)
861 %{_libdir}/liblld[ACDEHMRXY]*.a
862 %{_includedir}/lld
863
864 %if %{with lldb}
865 %files -n lldb
866 %defattr(644,root,root,755)
867 %attr(755,root,root) %{_bindir}/lldb
868 %attr(755,root,root) %{_bindir}/lldb-%{version}
869 %attr(755,root,root) %{_bindir}/lldb-argdumper
870 %attr(755,root,root) %{_bindir}/lldb-mi
871 %attr(755,root,root) %{_bindir}/lldb-mi-%{version}
872 %attr(755,root,root) %{_bindir}/lldb-server
873 %attr(755,root,root) %{_bindir}/lldb-server-%{version}
874 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
875 %dir %{py_sitedir}/lldb
876 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
877 %{py_sitedir}/lldb/formatters
878 %{py_sitedir}/lldb/runtime
879 %{py_sitedir}/lldb/utils
880 %{py_sitedir}/lldb/__init__.py[co]
881 %{py_sitedir}/lldb/embedded_interpreter.py[co]
882 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
883 %attr(755,root,root) %{py_sitedir}/readline.so
884
885 %files -n lldb-devel
886 %defattr(644,root,root,755)
887 %attr(755,root,root) %{_libdir}/liblldb.so
888 %{_libdir}/liblldb*.a
889 %{_includedir}/lldb
890 %endif
891
892 %if %{with ocaml}
893 %files ocaml
894 %defattr(644,root,root,755)
895 %{_libdir}/ocaml/META.llvm*
896 %attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
897 %{_libdir}/ocaml/llvm*.cma
898 %{_libdir}/ocaml/llvm*.cmi
899
900 %files ocaml-devel
901 %defattr(644,root,root,755)
902 %{_libdir}/ocaml/libllvm*.a
903 %{_libdir}/ocaml/llvm*.a
904 %{_libdir}/ocaml/llvm*.cmx*
905
906 %files ocaml-doc
907 %defattr(644,root,root,755)
908 %doc ocamldocs/*
909 %endif
This page took 0.093508 seconds and 4 git commands to generate.