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