]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- updated abi ver
[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
9ace1f65 129%define abi 3.9
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
dd9350c7
JB
565%endif
566
aa11c230 567%install
568rm -rf $RPM_BUILD_ROOT
41876fe7 569%{__make} -C build install \
aa11c230 570 DESTDIR=$RPM_BUILD_ROOT
571
6df3b432
JB
572# only some .pyc files are created by make install
573%py_comp $RPM_BUILD_ROOT%{py_sitedir}
574%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
575
634a3e5b 576# Adjust static analyzer installation
9556f4c9 577# http://clang-analyzer.llvm.org/installation#OtherPlatforms
634a3e5b
JB
578install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
579%{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
80d95ac6 580%{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
634a3e5b
JB
581%py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
582%py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
583%py_postclean %{_datadir}/scan-view
d997b14b 584
6df3b432 585# not installed by cmake buildsystem
6df3b432
JB
586install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
587
b0068ae4 588%if %{with doc}
6df3b432 589cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
b883cf1e
JB
590# these tools are not installed
591%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
b0068ae4
JB
592# make links
593echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
dd9350c7
JB
594%endif
595
d997b14b 596# Move documentation back to build directory
2bbd0701 597%if %{with ocaml}
6df3b432 598rm -rf ocamldocs
634a3e5b 599%{__mv} $RPM_BUILD_ROOT%{_prefix}/docs/ocaml/html/html ocamldocs
2bbd0701 600%endif
9556f4c9
ER
601
602# and separate the apidoc
603%if %{with apidocs}
6df3b432
JB
604rm -rf clang-apidoc
605cp -a build/tools/clang/docs/html clang-apidoc
9556f4c9 606%endif
d997b14b
AM
607
608# And prepare Clang documentation
d997b14b 609rm -rf clang-docs
9556f4c9 610install -d clang-docs
827664e9 611for f in LICENSE.TXT NOTES.txt README.txt; do
9556f4c9 612 ln tools/clang/$f clang-docs
d997b14b 613done
021b3c3d 614
6832a5c5 615# Get rid of erroneously installed example files.
6df3b432
JB
616%{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
617# test?
d706a70d 618%{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
6df3b432
JB
619# not this OS
620%{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
d706a70d
JB
621# use system six
622%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
6832a5c5 623
aa11c230 624%clean
625rm -rf $RPM_BUILD_ROOT
626
8c514f23
JB
627%post libs -p /sbin/ldconfig
628%postun libs -p /sbin/ldconfig
aa11c230 629
5a7ac479
JB
630%post -n clang -p /sbin/ldconfig
631%postun -n clang -p /sbin/ldconfig
632
633%post -n lldb -p /sbin/ldconfig
634%postun -n lldb -p /sbin/ldconfig
635
aa11c230 636%files
637%defattr(644,root,root,755)
8132e62b 638%doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
a9beeab5 639%attr(755,root,root) %{_bindir}/bugpoint
a9beeab5
JB
640%attr(755,root,root) %{_bindir}/llc
641%attr(755,root,root) %{_bindir}/lli
8132e62b
JB
642%attr(755,root,root) %{_bindir}/llvm-ar
643%attr(755,root,root) %{_bindir}/llvm-as
644%attr(755,root,root) %{_bindir}/llvm-bcanalyzer
827664e9 645%attr(755,root,root) %{_bindir}/llvm-cov
8132e62b
JB
646%attr(755,root,root) %{_bindir}/llvm-diff
647%attr(755,root,root) %{_bindir}/llvm-dis
4ba3b2b3 648%attr(755,root,root) %{_bindir}/llvm-dsymutil
827664e9 649%attr(755,root,root) %{_bindir}/llvm-dwarfdump
264482e1 650%attr(755,root,root) %{_bindir}/llvm-dwp
8132e62b 651%attr(755,root,root) %{_bindir}/llvm-extract
6df3b432 652%attr(755,root,root) %{_bindir}/llvm-lib
8132e62b 653%attr(755,root,root) %{_bindir}/llvm-link
3c402b7e 654%attr(755,root,root) %{_bindir}/llvm-lto
8132e62b 655%attr(755,root,root) %{_bindir}/llvm-mc
dd9350c7 656%attr(755,root,root) %{_bindir}/llvm-mcmarkup
8132e62b
JB
657%attr(755,root,root) %{_bindir}/llvm-nm
658%attr(755,root,root) %{_bindir}/llvm-objdump
b883cf1e 659%attr(755,root,root) %{_bindir}/llvm-profdata
8132e62b 660%attr(755,root,root) %{_bindir}/llvm-ranlib
f981d747 661%attr(755,root,root) %{_bindir}/llvm-readobj
827664e9
PS
662%attr(755,root,root) %{_bindir}/llvm-rtdyld
663%attr(755,root,root) %{_bindir}/llvm-size
264482e1 664%attr(755,root,root) %{_bindir}/llvm-split
f981d747 665%attr(755,root,root) %{_bindir}/llvm-stress
1628dc68 666%attr(755,root,root) %{_bindir}/llvm-symbolizer
827664e9 667%attr(755,root,root) %{_bindir}/llvm-tblgen
41876fe7
JR
668%attr(755,root,root) %{_bindir}/llvm-cxxdump
669%attr(755,root,root) %{_bindir}/llvm-pdbdump
4ba3b2b3 670%attr(755,root,root) %{_bindir}/obj2yaml
8132e62b 671%attr(755,root,root) %{_bindir}/opt
d706a70d 672%attr(755,root,root) %{_bindir}/sancov
4ba3b2b3
JB
673%attr(755,root,root) %{_bindir}/verify-uselistorder
674%attr(755,root,root) %{_bindir}/yaml2obj
b0068ae4 675%if %{with doc}
a9beeab5 676%{_mandir}/man1/bugpoint.1*
a7973f21 677%{_mandir}/man1/lit.1*
a9beeab5
JB
678%{_mandir}/man1/llc.1*
679%{_mandir}/man1/lli.1*
8132e62b
JB
680%{_mandir}/man1/llvm-ar.1*
681%{_mandir}/man1/llvm-as.1*
682%{_mandir}/man1/llvm-bcanalyzer.1*
f981d747 683%{_mandir}/man1/llvm-cov.1*
8132e62b
JB
684%{_mandir}/man1/llvm-diff.1*
685%{_mandir}/man1/llvm-dis.1*
b883cf1e 686%{_mandir}/man1/llvm-dwarfdump.1*
8132e62b 687%{_mandir}/man1/llvm-extract.1*
d706a70d 688%{_mandir}/man1/llvm-lib.1*
8132e62b
JB
689%{_mandir}/man1/llvm-link.1*
690%{_mandir}/man1/llvm-nm.1*
b883cf1e 691%{_mandir}/man1/llvm-profdata.1*
8132e62b 692%{_mandir}/man1/llvm-ranlib.1*
c999855f 693%{_mandir}/man1/llvm-readobj.1*
f981d747 694%{_mandir}/man1/llvm-stress.1*
1628dc68 695%{_mandir}/man1/llvm-symbolizer.1*
a9beeab5 696%{_mandir}/man1/opt.1*
dd9350c7 697%{_mandir}/man1/tblgen.1*
b0068ae4 698%endif
bc88141a 699
8c514f23
JB
700%files libs
701%defattr(644,root,root,755)
9a23736f
JB
702%attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
703# non-soname symlink
704%attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
705%attr(755,root,root) %{_libdir}/libLTO.so
8c514f23 706
bc88141a
ER
707%files devel
708%defattr(644,root,root,755)
709%attr(755,root,root) %{_bindir}/llvm-config
9a23736f 710%attr(755,root,root) %{_libdir}/libLLVM.so
0a8510f2 711%attr(755,root,root) %{_libdir}/BugpointPasses.so
d706a70d 712%{_libdir}/libLLVM*.a
8132e62b
JB
713%{_includedir}/llvm
714%{_includedir}/llvm-c
9ace1f65 715%{_libdir}/cmake/llvm
b0068ae4 716%if %{with doc}
8132e62b 717%{_mandir}/man1/llvm-config.1*
b0068ae4 718%endif
bc88141a 719
6df3b432
JB
720#%files doc
721#%defattr(644,root,root,755)
9556f4c9
ER
722
723%if %{with apidocs}
724%files apidocs
725%defattr(644,root,root,755)
726%doc apidoc/*
727%endif
728
b0068ae4
JB
729%if %{with polly}
730%files polly
731%defattr(644,root,root,755)
6c2b1a44 732%doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
b0068ae4
JB
733%attr(755,root,root) %{_libdir}/LLVMPolly.so
734
735%files polly-devel
736%defattr(644,root,root,755)
9a23736f
JB
737%{_libdir}/libPolly.a
738%{_libdir}/libPollyISL.a
b0068ae4
JB
739%{_includedir}/polly
740%endif
741
d997b14b 742%files -n clang
bc88141a 743%defattr(644,root,root,755)
827664e9 744%doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
8132e62b
JB
745%attr(755,root,root) %{_bindir}/clang
746%attr(755,root,root) %{_bindir}/clang++
509439cf 747%attr(755,root,root) %{_bindir}/clang-%{abi}
dd9350c7 748%attr(755,root,root) %{_bindir}/clang-check
6df3b432 749%attr(755,root,root) %{_bindir}/clang-cl
1628dc68 750%attr(755,root,root) %{_bindir}/clang-format
6df3b432 751%attr(755,root,root) %{_bindir}/git-clang-format
5a7ac479
JB
752%dir %{_libdir}/clang
753%dir %{_libdir}/clang/%{version}
754%{_libdir}/clang/%{version}/include
755%if %{with rt}
b0e18b64 756%ifarch %{ix86} %{x8664} x32
9eefd942
JR
757%dir %{_libdir}/clang/%{version}/lib
758%dir %{_libdir}/clang/%{version}/lib/linux
759%endif
760%ifarch %{ix86}
761%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
762%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
c6c890ee
JB
763%endif
764%ifarch %{x8664}
9eefd942
JR
765%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
766%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
f4c0e8bd 767%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
3c402b7e 768%endif
b0e18b64 769%ifarch %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 ppc64
d706a70d
JB
770%{_libdir}/clang/%{version}/asan_blacklist.txt
771%endif
b0e18b64 772%ifarch %{ix86} %{x8664} x32 mips64
d706a70d
JB
773%{_libdir}/clang/%{version}/cfi_blacklist.txt
774%endif
b0e18b64 775%ifarch %{x8664} x32 aarch64 mips64
d706a70d
JB
776%{_libdir}/clang/%{version}/dfsan_abilist.txt
777%{_libdir}/clang/%{version}/msan_blacklist.txt
778%endif
5a7ac479 779%endif
3c402b7e
JB
780%dir %{_datadir}/clang
781%{_datadir}/clang/clang-format-diff.py
d997b14b 782
87977e26
JR
783%files -n clang-libs
784%defattr(644,root,root,755)
509439cf 785%attr(755,root,root) %{_libdir}/libclang.so.%{abi}
87977e26 786
589b92f5 787%if %{with rt} && %{with multilib}
b0e18b64 788%ifarch %{x8664} x32
9eefd942
JR
789%files -n clang-multilib
790%defattr(644,root,root,755)
791%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
792%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
793%endif
b0e18b64
JB
794%ifarch x32
795%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
796%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
797%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
798%endif
9eefd942
JR
799%endif
800
d997b14b 801%files -n clang-analyzer
bc88141a 802%defattr(644,root,root,755)
d997b14b
AM
803%attr(755,root,root) %{_bindir}/scan-build
804%attr(755,root,root) %{_bindir}/scan-view
634a3e5b
JB
805%{_datadir}/scan-build
806%{_datadir}/scan-view
dd9350c7 807%{_mandir}/man1/scan-build.1*
4522eb9a
JB
808%dir %{_libdir}/scan-build
809%attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
810%attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
8132e62b 811
9556f4c9
ER
812%files -n clang-devel
813%defattr(644,root,root,755)
9a23736f
JB
814%attr(755,root,root) %{_libdir}/libclang.so
815%{_libdir}/libclang*.a
9556f4c9
ER
816%{_includedir}/clang
817%{_includedir}/clang-c
9ace1f65 818%{_libdir}/cmake/clang
9556f4c9
ER
819
820%files -n clang-doc
821%defattr(644,root,root,755)
41876fe7 822%doc tools/clang/docs/*.{html,png,txt}
9556f4c9
ER
823
824%if %{with apidocs}
825%files -n clang-apidocs
826%defattr(644,root,root,755)
827%doc clang-apidoc/*
828%endif
829
b0068ae4
JB
830%files -n clang-tools-extra
831%defattr(644,root,root,755)
9ace1f65 832%doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
b0068ae4 833%attr(755,root,root) %{_bindir}/clang-apply-replacements
b883cf1e 834%attr(755,root,root) %{_bindir}/clang-query
4ba3b2b3 835%attr(755,root,root) %{_bindir}/clang-rename
b0068ae4 836%attr(755,root,root) %{_bindir}/clang-tidy
d706a70d 837%attr(755,root,root) %{_bindir}/modularize
b0068ae4 838%attr(755,root,root) %{_bindir}/pp-trace
d706a70d
JB
839%{_datadir}/clang/clang-tidy-diff.py
840%{_datadir}/clang/run-clang-tidy.py
b0068ae4 841
ba1cf74d
JB
842%files -n lld
843%defattr(644,root,root,755)
844%doc tools/lld/{LICENSE.TXT,README.md}
d706a70d 845%attr(755,root,root) %{_bindir}/ld.lld
ba1cf74d 846%attr(755,root,root) %{_bindir}/lld
d706a70d 847%attr(755,root,root) %{_bindir}/lld-link
ba1cf74d
JB
848
849%files -n lld-devel
850%defattr(644,root,root,755)
9a23736f 851%{_libdir}/liblld[ACDEHMRXY]*.a
ba1cf74d
JB
852%{_includedir}/lld
853
5a7ac479
JB
854%if %{with lldb}
855%files -n lldb
856%defattr(644,root,root,755)
857%attr(755,root,root) %{_bindir}/lldb
6df3b432 858%attr(755,root,root) %{_bindir}/lldb-%{version}
4522eb9a 859%attr(755,root,root) %{_bindir}/lldb-argdumper
b883cf1e 860%attr(755,root,root) %{_bindir}/lldb-mi
6df3b432
JB
861%attr(755,root,root) %{_bindir}/lldb-mi-%{version}
862%attr(755,root,root) %{_bindir}/lldb-server
863%attr(755,root,root) %{_bindir}/lldb-server-%{version}
864%attr(755,root,root) %{_libdir}/liblldb.so.%{version}
b883cf1e 865%dir %{py_sitedir}/lldb
4522eb9a 866%attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
6df3b432
JB
867%{py_sitedir}/lldb/formatters
868%{py_sitedir}/lldb/runtime
869%{py_sitedir}/lldb/utils
870%{py_sitedir}/lldb/__init__.py[co]
871%{py_sitedir}/lldb/embedded_interpreter.py[co]
b883cf1e
JB
872%attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
873%attr(755,root,root) %{py_sitedir}/readline.so
5a7ac479
JB
874
875%files -n lldb-devel
876%defattr(644,root,root,755)
6df3b432 877%attr(755,root,root) %{_libdir}/liblldb.so
5a7ac479
JB
878%{_libdir}/liblldb*.a
879%{_includedir}/lldb
880%endif
881
9556f4c9 882%if %{with ocaml}
d997b14b
AM
883%files ocaml
884%defattr(644,root,root,755)
11b6f380
JB
885%{_libdir}/ocaml/META.llvm*
886%attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
8132e62b
JB
887%{_libdir}/ocaml/llvm*.cma
888%{_libdir}/ocaml/llvm*.cmi
d997b14b
AM
889
890%files ocaml-devel
891%defattr(644,root,root,755)
8132e62b
JB
892%{_libdir}/ocaml/libllvm*.a
893%{_libdir}/ocaml/llvm*.a
894%{_libdir}/ocaml/llvm*.cmx*
9556f4c9
ER
895
896%files ocaml-doc
897%defattr(644,root,root,755)
6df3b432 898%doc ocamldocs/*
9556f4c9 899%endif
This page took 0.239137 seconds and 4 git commands to generate.