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