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