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