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: 793138412d2af2c7c7f54615f8943771
24 Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
25 # Source1-md5: 634de18d04b7a4ded19ec4c17d23cfca
26 # Data files should be installed with timestamps preserved
27 Patch3: %{name}-2.6-timestamp.patch
28 Patch4: %{name}-pld.patch
34 BuildRequires: doxygen
35 BuildRequires: graphviz
38 BuildRequires: dejagnu
40 BuildRequires: tcl-devel
43 BuildRequires: libltdl-devel
44 BuildRequires: libstdc++-devel >= 5:3.4
45 BuildRequires: ocaml-ocamldoc
46 BuildRequires: perl-tools-pod
47 BuildRequires: rpm-pythonprov
48 # gcc4 might be installed, but not current __cc
49 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
50 BuildRequires: __cc >= 3.4
52 # LLVM is not supported on PPC64
53 # http://llvm.org/bugs/show_bug.cgi?id=3729
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sysconfdir /etc/%{name}
59 %define specflags_ppc -fno-var-tracking-assignments
61 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
62 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
65 LLVM is a compiler infrastructure designed for compile-time,
66 link-time, runtime, and idle-time optimization of programs from
67 arbitrary programming languages. LLVM is written in C++ and has been
68 developed since 2000 at the University of Illinois and Apple. It
69 currently supports compilation of C and C++ programs, using front-ends
70 derived from GCC 4.0.1. A new front-end for the C family of languages
71 is in development. The compiler infrastructure includes mirror sets of
72 programming tools as well as libraries with equivalent functionality.
74 %description -l pl.UTF-8
75 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
76 czasu kompilowania, linkowania, działania i bezczynności programów w
77 dowolnych językach programowania. Jest napisana w C++, rozwijana od
78 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
79 kompilację programów w C i C++ przy użyciu frontendów wywodzących się
80 z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
81 rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
82 narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
86 Summary: Libraries and header files for LLVM
87 Group: Development/Languages
88 Requires: %{name} = %{version}-%{release}
89 Requires: libstdc++-devel >= 6:3.4
92 This package contains library and header files needed to develop new
93 native programs that use the LLVM infrastructure.
96 Summary: Documentation for LLVM
98 # does not require base
101 Documentation for the LLVM compiler infrastructure.
104 Summary: API documentation for LLVM
105 Group: Development/Languages
106 Requires: %{name}-doc = %{version}-%{release}
109 API documentation for the LLVM compiler infrastructure.
112 Summary: A C language family frontend for LLVM
114 Group: Development/Languages
116 %description -n clang
117 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
118 of a crane or goose. 3. C-language family front-end toolkit.
120 The goal of the Clang project is to create a new C, C++, Objective C
121 and Objective C++ front-end for the LLVM compiler. Its tools are built
122 as libraries and designed to be loosely-coupled and extendable.
124 %package -n clang-analyzer
125 Summary: A source code analysis framework
127 Group: Development/Languages
128 Requires: clang = %{version}-%{release}
129 # not picked up automatically since files are currently not instaled
130 # in standard Python hierarchies yet
133 %description -n clang-analyzer
134 The Clang Static Analyzer consists of both a source code analysis
135 framework and a standalone tool that finds bugs in C and Objective-C
136 programs. The standalone tool is invoked from the command-line, and is
137 intended to run in tandem with a build of a project or code base.
139 %package -n clang-devel
140 Summary: Header files for clang
141 Group: Development/Languages
142 Requires: clang = %{version}-%{release}
144 %description -n clang-devel
145 This package contains header files for the Clang compiler.
147 %package -n clang-doc
148 Summary: Documentation for Clang
150 Requires: %{name} = %{version}-%{release}
152 %description -n clang-doc
153 Documentation for the Clang compiler front-end.
155 %package -n clang-apidocs
156 Summary: API documentation for Clang
157 Group: Development/Languages
158 Requires: clang-doc = %{version}-%{release}
160 %description -n clang-apidocs
161 API documentation for the Clang compiler.
164 Summary: OCaml binding for LLVM
165 Group: Development/Libraries
166 Requires: %{name} = %{version}-%{release}
167 %requires_eq ocaml-runtime
170 OCaml binding for LLVM.
173 Summary: Development files for %{name}-ocaml
174 Group: Development/Libraries
175 Requires: %{name}-devel = %{version}-%{release}
176 Requires: %{name}-ocaml = %{version}-%{release}
178 %description ocaml-devel
179 The llvm-ocaml-devel package contains libraries and signature files
180 for developing applications that use llvm-ocaml.
183 Summary: Documentation for LLVM's OCaml binding
185 Requires: %{name}-ocaml = %{version}-%{release}
187 %description ocaml-doc
188 HTML documentation for LLVM's OCaml binding.
192 mv clang-*.* tools/clang
196 sed -i 's|triplet-plox-here|%{_host}|' tools/clang/lib/Driver/ToolChains.cpp
198 # configure does not properly specify libdir
199 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
201 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
202 s,^#!.*bin/env python,#!%{__python},
203 s,^#!.*bin/env perl,#!%{__perl},
209 # Disabling assertions now, rec. by pure and needed for OpenGTL
210 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
212 # bash specific 'test a < b'
215 --libdir=%{_libdir}/%{name} \
216 --datadir=%{_datadir}/%{name}-%{version} \
224 --disable-assertions \
225 --enable-debug-runtime \
233 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
236 %{__make} check 2>&1 | tee llvm-testlog.txt
237 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
241 rm -rf $RPM_BUILD_ROOT
242 %{__make} -C obj -j1 install \
243 PROJ_docsdir=/moredocs \
244 DESTDIR=$RPM_BUILD_ROOT
246 # Static analyzer not installed by default:
247 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
248 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
250 for f in scan-{build,view}; do
251 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
252 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
255 # Move documentation back to build directory
257 mv $RPM_BUILD_ROOT/moredocs .
258 rm -fv moredocs/*.tar.gz
259 rm -fv moredocs/ocamldoc/html/*.tar.gz
261 # and separate the apidoc
263 rm -rf apidoc clang-apidoc
264 mv moredocs/html/doxygen apidoc
265 cp -a tools/clang/docs/doxygen/html clang-apidoc
268 # And prepare Clang documentation
270 install -d clang-docs
271 for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
272 ln tools/clang/$f clang-docs
275 # Get rid of erroneously installed example files.
276 rm -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
278 # FIXME file this bug
279 sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \
280 $RPM_BUILD_ROOT%{_bindir}/llvm-config
282 # remove documentation makefiles:
283 # they require the build directory to work
284 rm -rf moredocs/examples
285 cp -a examples moredocs/examples
286 find moredocs/examples -name Makefile | xargs -0r rm -f
289 rm -rf $RPM_BUILD_ROOT
291 %post -p /sbin/ldconfig
292 %postun -p /sbin/ldconfig
295 %defattr(644,root,root,755)
296 %doc CREDITS.TXT LICENSE.TXT README.txt
297 %{?with_tests:%doc llvm-testlog.txt}
298 %attr(755,root,root) %{_bindir}/bugpoint
299 %attr(755,root,root) %{_bindir}/llc
300 %attr(755,root,root) %{_bindir}/lli
301 %attr(755,root,root) %{_bindir}/opt
302 %attr(755,root,root) %{_bindir}/llvmc
303 %attr(755,root,root) %{_bindir}/llvm-*
304 %attr(755,root,root) %{_bindir}/macho-dump
305 %exclude %attr(755,root,root) %{_bindir}/llvm-config
306 %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
307 %{_mandir}/man1/bugpoint.1*
308 %{_mandir}/man1/lit.1*
309 %{_mandir}/man1/llc.1*
310 %{_mandir}/man1/lli.1*
311 %{_mandir}/man1/llvm-*.1*
312 %{_mandir}/man1/llvmc.1*
313 %{_mandir}/man1/llvmgcc.1*
314 %{_mandir}/man1/llvmgxx.1*
315 %{_mandir}/man1/opt.1*
316 #%{_mandir}/man1/stkrc.1*
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_bindir}/llvm-config
322 %{_includedir}/llvm-c
324 # x86-64 only .a/.so?
326 %attr(755,root,root) %{_libdir}/BugpointPasses.so
327 %attr(755,root,root) %{_libdir}/libEnhancedDisassembly.so
328 %attr(755,root,root) %{_libdir}/libLTO.so
331 %exclude %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
332 %exclude %attr(755,root,root) %{_libdir}/libclang.so
333 %attr(755,root,root) %{_libdir}/profile_rt.so
336 %defattr(644,root,root,755)
337 %doc moredocs/examples moredocs/html
341 %defattr(644,root,root,755)
346 %defattr(644,root,root,755)
348 %{?with_tests:%doc clang-testlog.txt}
349 %attr(755,root,root) %{_bindir}/clang*
350 %attr(755,root,root) %{_bindir}/tblgen
351 %attr(755,root,root) %{_libdir}/libclang.so
353 %{_mandir}/man1/clang.1.*
354 %{_mandir}/man1/tblgen.1*
356 %files -n clang-analyzer
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_bindir}/scan-build
359 %attr(755,root,root) %{_bindir}/scan-view
360 %dir %{_libdir}/clang-analyzer
362 %dir %{_libdir}/clang-analyzer/scan-view
363 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
364 %{_libdir}/clang-analyzer/scan-view/Resources
365 %{_libdir}/clang-analyzer/scan-view/*.py
367 %dir %{_libdir}/clang-analyzer/scan-build
368 %{_libdir}/clang-analyzer/scan-build/*.css
369 %{_libdir}/clang-analyzer/scan-build/*.js
370 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
371 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
373 %files -n clang-devel
374 %defattr(644,root,root,755)
376 %{_includedir}/clang-c
379 %defattr(644,root,root,755)
380 %doc tools/clang/docs/*
383 %files -n clang-apidocs
384 %defattr(644,root,root,755)
390 %defattr(644,root,root,755)
391 %{_libdir}/ocaml/*.cma
392 %{_libdir}/ocaml/*.cmi
395 %defattr(644,root,root,755)
397 %{_libdir}/ocaml/*.cmx*
398 %{_libdir}/ocaml/*.mli
401 %defattr(644,root,root,755)
402 %doc moredocs/ocamldoc/html/*