2 #warning: Installed (but unpackaged) file(s) found:
3 # /usr/share/man/man1/lit.1.gz
6 %bcond_without ocaml # ocaml binding
7 %bcond_with apidocs # The doxygen docs are HUGE, so they are not built by default.
8 %bcond_with tests # run tests
10 %ifarch s390 s390x sparc64
11 # No ocaml on these arches
15 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
16 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
20 License: University of Illinois/NCSA Open Source License
21 Group: Development/Languages
22 Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tgz
23 # Source0-md5: 220d361b4d17051ff4bb21c64abe05ba
24 Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
25 # Source1-md5: 10e14c901fc3728eecbd5b829e011b59
26 # Data files should be installed with timestamps preserved
27 Patch3: %{name}-2.6-timestamp.patch
33 BuildRequires: doxygen
34 BuildRequires: graphviz
37 BuildRequires: dejagnu
39 BuildRequires: tcl-devel
42 BuildRequires: libltdl-devel
43 BuildRequires: libstdc++-devel >= 5:3.4
44 BuildRequires: ocaml-ocamldoc
45 BuildRequires: perl-tools-pod
46 BuildRequires: rpm-pythonprov
47 # gcc4 might be installed, but not current __cc
48 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
49 BuildRequires: __cc >= 3.4
51 # LLVM is not supported on PPC64
52 # http://llvm.org/bugs/show_bug.cgi?id=3729
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define _sysconfdir /etc/%{name}
58 %define specflags_ppc -fno-var-tracking-assignments
60 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
61 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
64 LLVM is a compiler infrastructure designed for compile-time,
65 link-time, runtime, and idle-time optimization of programs from
66 arbitrary programming languages. LLVM is written in C++ and has been
67 developed since 2000 at the University of Illinois and Apple. It
68 currently supports compilation of C and C++ programs, using front-ends
69 derived from GCC 4.0.1. A new front-end for the C family of languages
70 is in development. The compiler infrastructure includes mirror sets of
71 programming tools as well as libraries with equivalent functionality.
73 %description -l pl.UTF-8
74 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
75 czasu kompilowania, linkowania, działania i bezczynności programów w
76 dowolnych językach programowania. Jest napisana w C++, rozwijana od
77 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
78 kompilację programów w C i C++ przy użyciu frontendów wywodzących się
79 z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
80 rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
81 narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
85 Summary: Libraries and header files for LLVM
86 Group: Development/Languages
87 Requires: %{name} = %{version}-%{release}
88 Requires: libstdc++-devel >= 6:3.4
91 This package contains library and header files needed to develop new
92 native programs that use the LLVM infrastructure.
95 Summary: Documentation for LLVM
97 # does not require base
100 Documentation for the LLVM compiler infrastructure.
103 Summary: API documentation for LLVM
104 Group: Development/Languages
105 Requires: %{name}-doc = %{version}-%{release}
108 API documentation for the LLVM compiler infrastructure.
111 Summary: A C language family frontend for LLVM
113 Group: Development/Languages
115 %description -n clang
116 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
117 of a crane or goose. 3. C-language family front-end toolkit.
119 The goal of the Clang project is to create a new C, C++, Objective C
120 and Objective C++ front-end for the LLVM compiler. Its tools are built
121 as libraries and designed to be loosely-coupled and extendable.
123 %package -n clang-analyzer
124 Summary: A source code analysis framework
126 Group: Development/Languages
127 Requires: clang = %{version}-%{release}
128 # not picked up automatically since files are currently not instaled
129 # in standard Python hierarchies yet
132 %description -n clang-analyzer
133 The Clang Static Analyzer consists of both a source code analysis
134 framework and a standalone tool that finds bugs in C and Objective-C
135 programs. The standalone tool is invoked from the command-line, and is
136 intended to run in tandem with a build of a project or code base.
138 %package -n clang-devel
139 Summary: Header files for clang
140 Group: Development/Languages
141 Requires: clang = %{version}-%{release}
143 %description -n clang-devel
144 This package contains header files for the Clang compiler.
146 %package -n clang-doc
147 Summary: Documentation for Clang
149 Requires: %{name} = %{version}-%{release}
151 %description -n clang-doc
152 Documentation for the Clang compiler front-end.
154 %package -n clang-apidocs
155 Summary: API documentation for Clang
156 Group: Development/Languages
157 Requires: clang-doc = %{version}-%{release}
159 %description -n clang-apidocs
160 API documentation for the Clang compiler.
163 Summary: OCaml binding for LLVM
164 Group: Development/Libraries
165 Requires: %{name} = %{version}-%{release}
166 %requires_eq ocaml-runtime
169 OCaml binding for LLVM.
172 Summary: Development files for %{name}-ocaml
173 Group: Development/Libraries
174 Requires: %{name}-devel = %{version}-%{release}
175 Requires: %{name}-ocaml = %{version}-%{release}
177 %description ocaml-devel
178 The llvm-ocaml-devel package contains libraries and signature files
179 for developing applications that use llvm-ocaml.
182 Summary: Documentation for LLVM's OCaml binding
184 Requires: %{name}-ocaml = %{version}-%{release}
186 %description ocaml-doc
187 HTML documentation for LLVM's OCaml binding.
191 mv clang-*.* tools/clang
194 # configure does not properly specify libdir
195 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
197 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
198 s,^#!.*bin/env python,#!%{__python},
199 s,^#!.*bin/env perl,#!%{__perl},
205 # Disabling assertions now, rec. by pure and needed for OpenGTL
206 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
208 # bash specific 'test a < b'
211 --libdir=%{_libdir}/%{name} \
212 --datadir=%{_datadir}/%{name}-%{version} \
220 --disable-assertions \
221 --enable-debug-runtime \
228 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
231 %{__make} check 2>&1 | tee llvm-testlog.txt
232 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
236 rm -rf $RPM_BUILD_ROOT
237 %{__make} -C obj -j1 install \
238 PROJ_docsdir=/moredocs \
239 DESTDIR=$RPM_BUILD_ROOT
241 # Static analyzer not installed by default:
242 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
243 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
245 for f in scan-{build,view}; do
246 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
247 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
250 # Move documentation back to build directory
252 mv $RPM_BUILD_ROOT/moredocs .
253 rm -fv moredocs/*.tar.gz
254 rm -fv moredocs/ocamldoc/html/*.tar.gz
256 # and separate the apidoc
258 rm -rf apidoc clang-apidoc
259 mv moredocs/html/doxygen apidoc
260 cp -a tools/clang/docs/doxygen/html clang-apidoc
263 # And prepare Clang documentation
265 install -d clang-docs
266 for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
267 ln tools/clang/$f clang-docs
270 # Get rid of erroneously installed example files.
271 rm -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
273 # FIXME file this bug
274 sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \
275 $RPM_BUILD_ROOT%{_bindir}/llvm-config
277 # remove documentation makefiles:
278 # they require the build directory to work
279 rm -rf moredocs/examples
280 cp -a examples moredocs/examples
281 find moredocs/examples -name Makefile | xargs -0r rm -f
284 rm -rf $RPM_BUILD_ROOT
286 %post -p /sbin/ldconfig
287 %postun -p /sbin/ldconfig
290 %defattr(644,root,root,755)
291 %doc CREDITS.TXT LICENSE.TXT README.txt
292 %{?with_tests:%doc llvm-testlog.txt}
293 %attr(755,root,root) %{_bindir}/bugpoint
294 %attr(755,root,root) %{_bindir}/llc
295 %attr(755,root,root) %{_bindir}/lli
296 %attr(755,root,root) %{_bindir}/opt
297 %attr(755,root,root) %{_bindir}/llvmc
298 %attr(755,root,root) %{_bindir}/llvm-*
299 %exclude %attr(755,root,root) %{_bindir}/llvm-config
300 %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
301 %{_mandir}/man1/bugpoint.1*
302 %{_mandir}/man1/llc.1*
303 %{_mandir}/man1/lli.1*
304 %{_mandir}/man1/llvmc.1*
305 %{_mandir}/man1/llvm-*.1*
306 %{_mandir}/man1/llvmgcc.1*
307 %{_mandir}/man1/llvmgxx.1*
308 %{_mandir}/man1/opt.1*
309 #%{_mandir}/man1/stkrc.1*
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/llvm-config
315 %{_includedir}/llvm-c
317 # x86-64 only .a/.so?
319 %attr(755,root,root) %{_libdir}/libBugpointPasses.so
320 %attr(755,root,root) %{_libdir}/libEnhancedDisassembly.so
321 %attr(755,root,root) %{_libdir}/libLTO.so
324 %exclude %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
325 %exclude %attr(755,root,root) %{_libdir}/libclang.so
326 %attr(755,root,root) %{_libdir}/libprofile_rt.so
329 %defattr(644,root,root,755)
330 %doc moredocs/examples moredocs/html
334 %defattr(644,root,root,755)
339 %defattr(644,root,root,755)
341 %{?with_tests:%doc clang-testlog.txt}
342 %attr(755,root,root) %{_bindir}/clang*
343 %attr(755,root,root) %{_bindir}/tblgen
344 %attr(755,root,root) %{_bindir}/c-index-test
345 %attr(755,root,root) %{_libdir}/libclang.so
347 %{_mandir}/man1/clang.1.*
348 %{_mandir}/man1/tblgen.1*
350 %files -n clang-analyzer
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{_bindir}/scan-build
353 %attr(755,root,root) %{_bindir}/scan-view
354 %dir %{_libdir}/clang-analyzer
356 %dir %{_libdir}/clang-analyzer/scan-view
357 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
358 %{_libdir}/clang-analyzer/scan-view/Resources
359 %{_libdir}/clang-analyzer/scan-view/*.py
361 %dir %{_libdir}/clang-analyzer/scan-build
362 %{_libdir}/clang-analyzer/scan-build/*.css
363 %{_libdir}/clang-analyzer/scan-build/*.js
364 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
365 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
367 %files -n clang-devel
368 %defattr(644,root,root,755)
370 %{_includedir}/clang-c
373 %defattr(644,root,root,755)
374 %doc tools/clang/docs/*
377 %files -n clang-apidocs
378 %defattr(644,root,root,755)
384 %defattr(644,root,root,755)
385 %{_libdir}/ocaml/*.cma
386 %{_libdir}/ocaml/*.cmi
389 %defattr(644,root,root,755)
391 %{_libdir}/ocaml/*.cmx*
392 %{_libdir}/ocaml/*.mli
395 %defattr(644,root,root,755)
396 %doc moredocs/ocamldoc/html/*