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