1 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
---|
2 | |
---|
3 | # Build options: |
---|
4 | # Components skipped by default: |
---|
5 | %bcond_with doxygen |
---|
6 | |
---|
7 | # Documentation install path |
---|
8 | %global llvmdocdir() %{_docdir}/%1-%{version} |
---|
9 | |
---|
10 | Name: llvm |
---|
11 | Version: 3.6.2 |
---|
12 | Release: 2%{?_dist_release} |
---|
13 | Summary: The Low Level Virtual Machine |
---|
14 | Summary(ja): LLVM - 低レベルバーチャルマシン |
---|
15 | |
---|
16 | Group: Development/Languages |
---|
17 | License: NCSA |
---|
18 | URL: http://llvm.org/ |
---|
19 | Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz |
---|
20 | Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz |
---|
21 | Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz |
---|
22 | Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz |
---|
23 | |
---|
24 | # multilib fixes |
---|
25 | Source10: llvm-Config-config.h |
---|
26 | Source11: llvm-Config-llvm-config.h |
---|
27 | |
---|
28 | # patches |
---|
29 | Patch1: llvm-3.5.0-build-fix.patch |
---|
30 | Patch2: 0001-data-install-preserve-timestamps.patch |
---|
31 | |
---|
32 | # newish glibc hides the definition of __extern_always_inline behind |
---|
33 | # a check for gcc 4.3, clang pretends to be gcc 4.2. a proper fix would |
---|
34 | # be to build everything herein with gcc, but i don't have the patience |
---|
35 | # atm, so in the interest of bootstrapping... |
---|
36 | Patch100: clang-fake-gcc43.patch |
---|
37 | # http://llvm.org/bugs/show_bug.cgi?id=22625 |
---|
38 | Patch101: clang-pr22625.patch |
---|
39 | |
---|
40 | Patch200: lldb-python.patch |
---|
41 | Patch201: lldb-fix-expression-parser.patch |
---|
42 | Patch202: lldb-python-module-symlink.patch |
---|
43 | |
---|
44 | # Vine Patch |
---|
45 | Patch1000: clang-3.6.1-driver-ld.gold.patch |
---|
46 | Patch1001: clang-3.5.0-driver-lib64.patch |
---|
47 | Patch1002: clang-3.5.0-driver-vine.patch |
---|
48 | |
---|
49 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
50 | |
---|
51 | BuildRequires: binutils-devel |
---|
52 | BuildRequires: bison |
---|
53 | BuildRequires: chrpath |
---|
54 | BuildRequires: flex |
---|
55 | BuildRequires: gcc-c++ >= 3.4 |
---|
56 | BuildRequires: groff |
---|
57 | BuildRequires: libffi-devel |
---|
58 | BuildRequires: libtool-ltdl-devel |
---|
59 | BuildRequires: libxml2-devel |
---|
60 | BuildRequires: ocaml-findlib |
---|
61 | BuildRequires: ocaml-ctypes |
---|
62 | BuildRequires: ocaml-ounit |
---|
63 | # for DejaGNU test suite |
---|
64 | BuildRequires: dejagnu tcl-devel python |
---|
65 | %if %{with doxygen} |
---|
66 | BuildRequires: doxygen graphviz |
---|
67 | %endif |
---|
68 | # pod2man |
---|
69 | BuildRequires: perl |
---|
70 | # lldb |
---|
71 | BuildRequires: swig |
---|
72 | BuildRequires: libedit-devel |
---|
73 | BuildRequires: python-devel >= 2.7 |
---|
74 | |
---|
75 | Requires: llvm-libs = %{version}-%{release} |
---|
76 | |
---|
77 | # LLVM is not supported on PPC64 |
---|
78 | # http://llvm.org/bugs/show_bug.cgi?id=3729 |
---|
79 | ExcludeArch: ppc64 |
---|
80 | |
---|
81 | %description |
---|
82 | LLVM is a compiler infrastructure designed for compile-time, |
---|
83 | link-time, runtime, and idle-time optimization of programs from |
---|
84 | arbitrary programming languages. The compiler infrastructure includes |
---|
85 | mirror sets of programming tools as well as libraries with equivalent |
---|
86 | functionality. |
---|
87 | |
---|
88 | |
---|
89 | %package devel |
---|
90 | Summary: Libraries and header files for LLVM |
---|
91 | Summary(ja): LLVM のライブラリおよびヘッダファイル |
---|
92 | Group: Development/Libraries |
---|
93 | Requires: %{name} = %{version}-%{release} |
---|
94 | Requires: libstdc++-devel |
---|
95 | Requires: libffi-devel |
---|
96 | Provides: llvm-static = %{version}-%{release} |
---|
97 | |
---|
98 | %description devel |
---|
99 | This package contains library and header files needed to develop new |
---|
100 | native programs that use the LLVM infrastructure. |
---|
101 | |
---|
102 | |
---|
103 | %package doc |
---|
104 | Summary: Documentation for LLVM |
---|
105 | Summary(ja): LLVM のドキュメント |
---|
106 | Group: Documentation |
---|
107 | BuildArch: noarch |
---|
108 | Requires: %{name} = %{version}-%{release} |
---|
109 | # might seem redundant, but needed to kill off the old arch-ed -doc subpackage |
---|
110 | Obsoletes: %{name}-doc < %{version}-%{release} |
---|
111 | |
---|
112 | %description doc |
---|
113 | Documentation for the LLVM compiler infrastructure. |
---|
114 | |
---|
115 | |
---|
116 | %package libs |
---|
117 | Summary: LLVM shared libraries |
---|
118 | Summary(ja): LLVM 共有ライブラリ |
---|
119 | Group: System Environment/Libraries |
---|
120 | |
---|
121 | %description libs |
---|
122 | Shared libraries for the LLVM compiler infrastructure. |
---|
123 | |
---|
124 | %description libs -l ja |
---|
125 | LLVM コンパイラ基盤の共有ライブラリです. |
---|
126 | |
---|
127 | %package -n clang |
---|
128 | Summary: A C language family front-end for LLVM |
---|
129 | Summary(ja): LLVM の C 言語フロントエンド |
---|
130 | License: NCSA |
---|
131 | Group: Development/Languages |
---|
132 | Requires: %{name} = %{version}-%{release} |
---|
133 | # clang requires gcc, clang++ requires libstdc++-devel |
---|
134 | Requires: libstdc++-devel |
---|
135 | # remove clang-doc pacakge |
---|
136 | Obsoletes: clang-doc < %{version}-%{release} |
---|
137 | |
---|
138 | %description -n clang |
---|
139 | clang: noun |
---|
140 | 1. A loud, resonant, metallic sound. |
---|
141 | 2. The strident call of a crane or goose. |
---|
142 | 3. C-language family front-end toolkit. |
---|
143 | |
---|
144 | The goal of the Clang project is to create a new C, C++, Objective C |
---|
145 | and Objective C++ front-end for the LLVM compiler. Its tools are built |
---|
146 | as libraries and designed to be loosely-coupled and extensible. |
---|
147 | |
---|
148 | %Package -n clang-libs |
---|
149 | Summary: Runtime library for clang |
---|
150 | Summary(ja): Clang のランタイムライブラリ |
---|
151 | Group: System Environment/Libraries |
---|
152 | |
---|
153 | %description -n clang-libs |
---|
154 | Runtime library for clang. |
---|
155 | |
---|
156 | %description -n clang-libs -l ja |
---|
157 | Clang のランタイムライブラリです. |
---|
158 | |
---|
159 | %package -n clang-devel |
---|
160 | Summary: Header files for clang |
---|
161 | Summary(ja): Clang のヘッダファイル |
---|
162 | Group: Development/Libraries |
---|
163 | Requires: clang = %{version}-%{release} |
---|
164 | |
---|
165 | %description -n clang-devel |
---|
166 | This package contains header files for the Clang compiler. |
---|
167 | |
---|
168 | %description -n clang-devel -l ja |
---|
169 | Clang コンパイラのヘッダファイル集です. |
---|
170 | |
---|
171 | %package -n clang-analyzer |
---|
172 | Summary: A source code analysis framework |
---|
173 | Summary(ja): ソースコー分析フレームワーク |
---|
174 | License: NCSA |
---|
175 | Group: Development/Languages |
---|
176 | Requires: clang = %{version}-%{release} |
---|
177 | # not picked up automatically since files are currently not instaled |
---|
178 | # in standard Python hierarchies yet |
---|
179 | Requires: python |
---|
180 | |
---|
181 | %description -n clang-analyzer |
---|
182 | The Clang Static Analyzer consists of both a source code analysis |
---|
183 | framework and a standalone tool that finds bugs in C and Objective-C |
---|
184 | programs. The standalone tool is invoked from the command-line, and is |
---|
185 | intended to run in tandem with a build of a project or code base. |
---|
186 | |
---|
187 | #%package -n clang-doc |
---|
188 | #Summary: Documentation for Clang |
---|
189 | #Summary(ja): Clang のドキュメント |
---|
190 | #Group: Documentation |
---|
191 | #Requires: %{name} = %{version}-%{release} |
---|
192 | # |
---|
193 | #%description -n clang-doc |
---|
194 | #Documentation for the Clang compiler front-end. |
---|
195 | |
---|
196 | %package -n lldb |
---|
197 | Summary: Next generation high-performance debugger |
---|
198 | Summary(ja): 高性能デバッガー |
---|
199 | License: NCSA |
---|
200 | Group: Development/Debuggers |
---|
201 | Requires: %{name} = %{version}-%{release} |
---|
202 | |
---|
203 | %description -n lldb |
---|
204 | LLDB is a next generation, high-performance debugger. It is built as a set |
---|
205 | of reusable components which highly leverage existing libraries in the |
---|
206 | larger LLVM Project, such as the Clang expression parser and LLVM |
---|
207 | disassembler. |
---|
208 | |
---|
209 | %package -n lldb-devel |
---|
210 | Summary: Header files for LLDB |
---|
211 | Summary(ja): LLDB のヘッダファイル |
---|
212 | Group: Development/Libraries |
---|
213 | Requires: lldb = %{version}-%{release} |
---|
214 | |
---|
215 | %description -n lldb-devel |
---|
216 | This package contains header files for the LLDB debugger. |
---|
217 | |
---|
218 | |
---|
219 | %if %{with doxygen} |
---|
220 | %package apidoc |
---|
221 | Summary: API documentation for LLVM |
---|
222 | Summary(ja): LLVM の API ドキュメント |
---|
223 | Group: Documentation |
---|
224 | BuildArch: noarch |
---|
225 | Requires: %{name}-docs = %{version}-%{release} |
---|
226 | |
---|
227 | %description apidoc |
---|
228 | API documentation for the LLVM compiler infrastructure. |
---|
229 | |
---|
230 | %package -n clang-apidoc |
---|
231 | Summary: API documentation for Clang |
---|
232 | Summary(ja): Clang の API ドキュメント |
---|
233 | Group: Documentation |
---|
234 | BuildArch: noarch |
---|
235 | |
---|
236 | %description -n clang-apidoc |
---|
237 | API documentation for the Clang compiler. |
---|
238 | %endif |
---|
239 | |
---|
240 | %package ocaml |
---|
241 | Summary: OCaml binding for LLVM |
---|
242 | Summary(ja): LLVM の OCaml バインディング |
---|
243 | Group: System Environment/Libraries |
---|
244 | Requires: %{name} = %{version}-%{release} |
---|
245 | Requires: ocaml |
---|
246 | |
---|
247 | %description ocaml |
---|
248 | OCaml binding for LLVM. |
---|
249 | |
---|
250 | %package ocaml-devel |
---|
251 | Summary: Development files for %{name}-ocaml |
---|
252 | Summary(ja): %{name}-ocaml の開発ファイル |
---|
253 | Group: Development/Libraries |
---|
254 | Requires: %{name}-devel = %{version}-%{release} |
---|
255 | Requires: %{name}-ocaml = %{version}-%{release} |
---|
256 | Requires: ocaml |
---|
257 | |
---|
258 | %description ocaml-devel |
---|
259 | The %{name}-ocaml-devel package contains libraries and signature files |
---|
260 | for developing applications that use %{name}-ocaml. |
---|
261 | |
---|
262 | %package ocaml-doc |
---|
263 | Summary: Documentation for %{name}-ocaml |
---|
264 | Summary(ja): %{name}-ocaml のドキュメント |
---|
265 | Group: Documentation |
---|
266 | BuildArch: noarch |
---|
267 | Requires: %{name}-ocaml = %{version}-%{release} |
---|
268 | # might seem redundant, but needed to kill off the old arch-ed -doc subpackage |
---|
269 | Obsoletes: %{name}-ocaml-doc < %{version}-%{release} |
---|
270 | |
---|
271 | %description ocaml-doc |
---|
272 | HTML documentation for LLVM's OCaml binding. |
---|
273 | |
---|
274 | # compat32' |
---|
275 | %package -n compat32-%{name}-libs |
---|
276 | Summary: LLVM shared libraries |
---|
277 | Summary(ja): LLVM 共有ライブラリ |
---|
278 | Group: System Environment/Libraries |
---|
279 | Requires: %{name}-libs = %{version}-%{release} |
---|
280 | |
---|
281 | %description -n compat32-%{name}-libs |
---|
282 | Shared libraries for the LLVM compiler infrastructure. |
---|
283 | |
---|
284 | |
---|
285 | %prep |
---|
286 | %setup -q -a1 -a2 -a3 -n llvm-%{version}.src |
---|
287 | rm -rf tools/clang tools/lldb projects/compiler-rt |
---|
288 | mv cfe-%{version}.src tools/clang |
---|
289 | mv compiler-rt-%{version}.src projects/compiler-rt |
---|
290 | mv lldb-%{version}.src tools/lldb |
---|
291 | |
---|
292 | #patch1 -p1 |
---|
293 | %patch2 -p1 |
---|
294 | |
---|
295 | # clang |
---|
296 | #pushd tools/clang |
---|
297 | #%patch100 -p1 |
---|
298 | #%patch101 -p0 |
---|
299 | #popd |
---|
300 | |
---|
301 | # lldb |
---|
302 | pushd tools/lldb |
---|
303 | # careful when recreating this patch... |
---|
304 | %patch200 -p1 -b .python |
---|
305 | #patch201 -p2 |
---|
306 | %patch202 -p1 |
---|
307 | sed -i s/@lib@/%{_lib}/g scripts/Python/modules/readline/Makefile |
---|
308 | popd |
---|
309 | |
---|
310 | # Vine Linux |
---|
311 | %patch1000 -p1 -b .driver-ld.gold |
---|
312 | #%ifarch x86_64 |
---|
313 | #%patch1001 -p1 -b .driver-lib64 |
---|
314 | #%endif |
---|
315 | %patch1002 -p1 -b .driver-vine |
---|
316 | |
---|
317 | # fix library paths |
---|
318 | sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' configure |
---|
319 | sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in |
---|
320 | sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp |
---|
321 | |
---|
322 | %build |
---|
323 | # -fno-devirtualize shouldn't be necessary, but gcc has scary template-related |
---|
324 | # bugs that make it so. gcc 5 ought to be fixed. |
---|
325 | export CC=gcc |
---|
326 | export CXX=g++ |
---|
327 | export CFLAGS="%{optflags} -DLLDB_DISABLE_PYTHON" |
---|
328 | export CXXFLAGS="%{optflags} -DLLDB_DISABLE_PYTHON" |
---|
329 | %configure \ |
---|
330 | --with-extra-options="-fno-devirtualize" \ |
---|
331 | --with-extra-ld-options=-Wl,-Bsymbolic \ |
---|
332 | --libdir=%{_libdir}/%{name} \ |
---|
333 | --disable-polly \ |
---|
334 | --disable-libcpp \ |
---|
335 | --enable-cxx11 \ |
---|
336 | --enable-clang-arcmt \ |
---|
337 | --enable-clang-static-analyzer \ |
---|
338 | --enable-clang-rewriter \ |
---|
339 | --enable-optimized \ |
---|
340 | --disable-profiling \ |
---|
341 | --disable-assertions \ |
---|
342 | --disable-werror \ |
---|
343 | --disable-expensive-checks \ |
---|
344 | --enable-debug-runtime \ |
---|
345 | --enable-keep-symbols \ |
---|
346 | --enable-jit \ |
---|
347 | --enable-docs \ |
---|
348 | %if %{with doxygen} |
---|
349 | --enable-doxygen \ |
---|
350 | %else |
---|
351 | --disable-doxygen \ |
---|
352 | %endif |
---|
353 | --enable-threads \ |
---|
354 | --enable-pthreads \ |
---|
355 | --enable-zlib \ |
---|
356 | --enable-pic \ |
---|
357 | --enable-shared \ |
---|
358 | --disable-embed-stdcxx \ |
---|
359 | --enable-timestamps \ |
---|
360 | --enable-backtraces \ |
---|
361 | --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz,r600 \ |
---|
362 | --enable-bindings=ocaml \ |
---|
363 | --enable-libffi \ |
---|
364 | --enable-ltdl-install \ |
---|
365 | \ |
---|
366 | %ifarch armv7hl armv7l |
---|
367 | --with-cpu=cortex-a8 \ |
---|
368 | --with-tune=cortex-a8 \ |
---|
369 | --with-arch=armv7-a \ |
---|
370 | --with-float=hard \ |
---|
371 | --with-fpu=vfpv3-d16 \ |
---|
372 | --with-abi=aapcs-vfp \ |
---|
373 | %endif |
---|
374 | \ |
---|
375 | --with-binutils-include=%{_includedir} \ |
---|
376 | --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \ |
---|
377 | --with-optimize-option=-O3 |
---|
378 | |
---|
379 | # --datadir=%{_libdir}/%{name} \ |
---|
380 | # --enable-experimental-targets=R600 \ |
---|
381 | |
---|
382 | make %{?_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 |
---|
383 | |
---|
384 | %install |
---|
385 | rm -rf %{buildroot} |
---|
386 | |
---|
387 | make install DESTDIR=%{buildroot} \ |
---|
388 | PROJ_docsdir=/moredocs |
---|
389 | |
---|
390 | # you have got to be kidding me |
---|
391 | rm -f %{buildroot}%{_bindir}/{FileCheck,count,not,verify-uselistorder,obj2yaml,yaml2obj} |
---|
392 | |
---|
393 | # multilib fixes |
---|
394 | mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} |
---|
395 | |
---|
396 | pushd %{buildroot}%{_includedir}/llvm/Config |
---|
397 | mv config.h config-%{__isa_bits}.h |
---|
398 | cp -p %{SOURCE10} config.h |
---|
399 | mv llvm-config.h llvm-config-%{__isa_bits}.h |
---|
400 | cp -p %{SOURCE11} llvm-config.h |
---|
401 | popd |
---|
402 | |
---|
403 | # Create ld.so.conf.d entry |
---|
404 | mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d |
---|
405 | cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF |
---|
406 | %{_libdir}/%{name} |
---|
407 | EOF |
---|
408 | |
---|
409 | # Static analyzer not installed by default: |
---|
410 | # http://clang-analyzer.llvm.org/installation#OtherPlatforms |
---|
411 | # scan-view |
---|
412 | mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/ |
---|
413 | cp -pr tools/clang/tools/scan-view %{buildroot}%{_libexecdir}/clang-analyzer/ |
---|
414 | |
---|
415 | # scan-build |
---|
416 | mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/scan-build |
---|
417 | for file in c++-analyzer ccc-analyzer scan-build scanview.css sorttable.js; do |
---|
418 | cp -p tools/clang/tools/scan-build/$file \ |
---|
419 | %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/ |
---|
420 | done |
---|
421 | |
---|
422 | # scan-build manual page |
---|
423 | mkdir -p %{buildroot}%{_mandir}/man1 |
---|
424 | cp -p tools/clang/tools/scan-build/scan-build.1 %{buildroot}%{_mandir}/man1/ |
---|
425 | |
---|
426 | # scan-build requires clang in search path |
---|
427 | ln -s ../../../bin/clang %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/clang |
---|
428 | |
---|
429 | # launchers in /bin |
---|
430 | for f in scan-{build,view}; do |
---|
431 | ln -s %{_libexecdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f |
---|
432 | done |
---|
433 | |
---|
434 | # Get rid of erroneously installed example files. |
---|
435 | rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.* |
---|
436 | |
---|
437 | # remove executable bit from static libraries |
---|
438 | find %{buildroot}%{_libdir} -name "*.a" -type f -print0 | xargs -0 chmod -x |
---|
439 | |
---|
440 | # Install man page for LLDB |
---|
441 | mkdir -p %{buildroot}%{_mandir}/man1 |
---|
442 | cp tools/lldb/docs/lldb.1 %{buildroot}%{_mandir}/man1/ |
---|
443 | |
---|
444 | # Install documentation documentation |
---|
445 | find %{buildroot}/moredocs/ -name "*.tar.gz" -print0 | xargs -0 rm -rf |
---|
446 | mkdir -p %{buildroot}%{_docdir} |
---|
447 | |
---|
448 | # llvm-doc |
---|
449 | mkdir -p %{buildroot}%{llvmdocdir %{name}-doc} |
---|
450 | cp -ar examples %{buildroot}%{llvmdocdir %{name}-doc}/examples |
---|
451 | find %{buildroot}%{llvmdocdir %{name}-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f |
---|
452 | |
---|
453 | # llvm-apidoc |
---|
454 | %if %{with doxygen} |
---|
455 | mv %{buildroot}/moredocs/html/doxygen %{buildroot}%{llvmdocdir %{name}-apidoc} |
---|
456 | %endif |
---|
457 | |
---|
458 | # llvm-ocaml-doc |
---|
459 | #mv %{buildroot}/moredocs/ocamldoc/html %{buildroot}%{llvmdocdir %{name}-ocaml-doc} |
---|
460 | |
---|
461 | # clang |
---|
462 | mkdir -p %{buildroot}%{llvmdocdir clang} |
---|
463 | for f in LICENSE.TXT NOTES.txt README.txt CODE_OWNERS.TXT; do |
---|
464 | cp tools/clang/$f %{buildroot}%{llvmdocdir clang}/ |
---|
465 | done |
---|
466 | |
---|
467 | # clang-apidoc |
---|
468 | %if %{with doxygen} |
---|
469 | cp -ar tools/clang/docs/doxygen/html %{buildroot}%{llvmdocdir clang-apidoc} |
---|
470 | %endif |
---|
471 | |
---|
472 | # lldb |
---|
473 | mkdir -p %{buildroot}%{llvmdocdir lldb} |
---|
474 | cp tools/lldb/LICENSE.TXT %{buildroot}%{llvmdocdir lldb}/ |
---|
475 | |
---|
476 | # delete the rest of installed documentation (because it's bad) |
---|
477 | rm -rf %{buildroot}/moredocs |
---|
478 | |
---|
479 | # install CMake modules |
---|
480 | mkdir -p %{buildroot}%{_datadir}/llvm/cmake/ |
---|
481 | cp -p cmake/modules/*.cmake %{buildroot}%{_datadir}/llvm/cmake/ |
---|
482 | |
---|
483 | # remove RPATHs |
---|
484 | file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d |
---|
485 | file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d |
---|
486 | |
---|
487 | |
---|
488 | %check |
---|
489 | # the || : is wrong, i know, but the git snaps fail to make check due to |
---|
490 | # broken makefiles in the doc dirs. |
---|
491 | make check LIT_ARGS="-v -j4" | tee llvm-testlog.txt ||: |
---|
492 | make -C tools/clang/test TESTARGS="-v -j4" | tee clang-testlog.txt ||: |
---|
493 | |
---|
494 | |
---|
495 | %clean |
---|
496 | rm -rf %{buildroot} |
---|
497 | |
---|
498 | |
---|
499 | %post libs -p /sbin/ldconfig |
---|
500 | %postun libs -p /sbin/ldconfig |
---|
501 | |
---|
502 | %post -n clang-libs -p /sbin/ldconfig |
---|
503 | %postun -n clang-libs -p /sbin/ldconfig |
---|
504 | |
---|
505 | %post -n lldb -p /sbin/ldconfig |
---|
506 | %postun -n lldb -p /sbin/ldconfig |
---|
507 | |
---|
508 | |
---|
509 | %posttrans devel |
---|
510 | # link llvm-config to the platform-specific file; |
---|
511 | # use ISA bits as priority so that 64-bit is preferred |
---|
512 | # over 32-bit if both are installed |
---|
513 | alternatives \ |
---|
514 | --install \ |
---|
515 | %{_bindir}/llvm-config \ |
---|
516 | llvm-config \ |
---|
517 | %{_bindir}/llvm-config-%{__isa_bits} \ |
---|
518 | %{__isa_bits} |
---|
519 | |
---|
520 | %postun devel |
---|
521 | if [ $1 -eq 0 ]; then |
---|
522 | alternatives --remove llvm-config \ |
---|
523 | %{_bindir}/llvm-config-%{__isa_bits} |
---|
524 | fi |
---|
525 | exit 0 |
---|
526 | |
---|
527 | |
---|
528 | %files |
---|
529 | %defattr(-,root,root,-) |
---|
530 | %doc CREDITS.TXT README.txt |
---|
531 | %{_bindir}/bugpoint |
---|
532 | %{_bindir}/llc |
---|
533 | %{_bindir}/lli |
---|
534 | %{_bindir}/lli-child-target |
---|
535 | %exclude %{_bindir}/llvm-config-%{__isa_bits} |
---|
536 | %{_bindir}/llvm* |
---|
537 | %{_bindir}/macho-dump |
---|
538 | %{_bindir}/opt |
---|
539 | %dir %{_datadir}/llvm |
---|
540 | %exclude %{_mandir}/man1/clang.1.* |
---|
541 | %exclude %{_mandir}/man1/scan-build.1.* |
---|
542 | %exclude %{_mandir}/man1/lldb.1.* |
---|
543 | %doc %{_mandir}/man1/*.1.* |
---|
544 | |
---|
545 | %files devel |
---|
546 | %defattr(-,root,root,-) |
---|
547 | #doc %{llvmdocdir %{name}-devel}/ |
---|
548 | %{_bindir}/llvm-config-%{__isa_bits} |
---|
549 | %{_includedir}/%{name} |
---|
550 | %{_includedir}/%{name}-c |
---|
551 | %{_libdir}/%{name}/*.a |
---|
552 | %{_datadir}/%{name}/cmake |
---|
553 | |
---|
554 | %files libs |
---|
555 | %defattr(-,root,root,-) |
---|
556 | %doc LICENSE.TXT |
---|
557 | %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf |
---|
558 | %dir %{_libdir}/%{name} |
---|
559 | %exclude %{_libdir}/%{name}/libclang.so |
---|
560 | %exclude %{_libdir}/%{name}/liblldb.so |
---|
561 | %{_libdir}/%{name}/*.so |
---|
562 | |
---|
563 | %files -n clang |
---|
564 | %defattr(-,root,root,-) |
---|
565 | %doc %{llvmdocdir clang}/ |
---|
566 | %{_bindir}/clang* |
---|
567 | %{_bindir}/c-index-test |
---|
568 | %{_prefix}/lib/clang |
---|
569 | %doc %{_mandir}/man1/clang.1.* |
---|
570 | |
---|
571 | %files -n clang-libs |
---|
572 | %defattr(-,root,root,-) |
---|
573 | %{_libdir}/%{name}/libclang.so |
---|
574 | |
---|
575 | %files -n clang-devel |
---|
576 | %defattr(-,root,root,-) |
---|
577 | #doc %{llvmdocdir clang-devel}/ |
---|
578 | %{_includedir}/clang |
---|
579 | %{_includedir}/clang-c |
---|
580 | |
---|
581 | %files -n clang-analyzer |
---|
582 | %defattr(-,root,root,-) |
---|
583 | %{_bindir}/scan-build |
---|
584 | %{_bindir}/scan-view |
---|
585 | %{_libexecdir}/clang-analyzer |
---|
586 | %{_mandir}/man1/scan-build.1.* |
---|
587 | |
---|
588 | %files -n lldb |
---|
589 | %defattr(-,root,root,-) |
---|
590 | %doc %{llvmdocdir lldb}/ |
---|
591 | %{_bindir}/lldb |
---|
592 | %{_bindir}/lldb-* |
---|
593 | %{_libdir}/%{name}/liblldb.so |
---|
594 | # XXX double check this |
---|
595 | #{python_sitearch}/* |
---|
596 | %doc %{_mandir}/man1/lldb.1.* |
---|
597 | |
---|
598 | %files -n lldb-devel |
---|
599 | %defattr(-,root,root,-) |
---|
600 | %{_includedir}/lldb |
---|
601 | |
---|
602 | %files doc |
---|
603 | %defattr(-,root,root,-) |
---|
604 | %doc %{llvmdocdir %{name}-doc}/ |
---|
605 | |
---|
606 | %files ocaml |
---|
607 | %defattr(-,root,root,-) |
---|
608 | %{_libdir}/ocaml/*.cma |
---|
609 | %{_libdir}/ocaml/*.cmi |
---|
610 | %{_libdir}/ocaml/*.so |
---|
611 | %{_libdir}/ocaml/META.llvm* |
---|
612 | |
---|
613 | %files ocaml-devel |
---|
614 | %defattr(-,root,root,-) |
---|
615 | %{_libdir}/ocaml/*.a |
---|
616 | %{_libdir}/ocaml/*.cmx* |
---|
617 | %{_libdir}/ocaml/*.mli |
---|
618 | |
---|
619 | %files ocaml-doc |
---|
620 | %defattr(-,root,root,-) |
---|
621 | #doc %{llvmdocdir %{name}-ocaml-doc}/ |
---|
622 | |
---|
623 | %if 0%{?_with_doxygen} |
---|
624 | %files apidoc |
---|
625 | %defattr(-,root,root,-) |
---|
626 | %doc %{llvmdocdir %{name}-apidoc}/ |
---|
627 | |
---|
628 | %files -n clang-apidoc |
---|
629 | %defattr(-,root,root,-) |
---|
630 | %doc %{llvmdocdir clang-apidoc}/ |
---|
631 | %endif |
---|
632 | |
---|
633 | %if %{build_compat32} |
---|
634 | %files -n compat32-%{name}-libs |
---|
635 | %defattr(-,root,root) |
---|
636 | %doc LICENSE.TXT |
---|
637 | %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf |
---|
638 | %dir %{_libdir}/%{name} |
---|
639 | %exclude %{_libdir}/%{name}/libclang.so |
---|
640 | %exclude %{_libdir}/%{name}/liblldb.so |
---|
641 | %{_libdir}/%{name}/*.so |
---|
642 | %endif |
---|
643 | |
---|
644 | %changelog |
---|
645 | * Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2 |
---|
646 | - rebuild with gcc-5.4.0 |
---|
647 | |
---|
648 | * Sat Sep 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1 |
---|
649 | - new upstream release |
---|
650 | - added BR: ocaml-ctypes |
---|
651 | |
---|
652 | * Thu Jun 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1 |
---|
653 | - new upstream release |
---|
654 | - dropt Patch 1, 201 and 1001 |
---|
655 | - updated Patch 1000 |
---|
656 | |
---|
657 | * Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1 |
---|
658 | - updated to 3.5.1 |
---|
659 | - added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora |
---|
660 | - added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage |
---|
661 | - obsoleted clang-doc |
---|
662 | - built with ocaml 4.02.1 |
---|
663 | |
---|
664 | * Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2 |
---|
665 | - fix <BTS:2832> |
---|
666 | - fix configure option "--with-c-include-dirs" |
---|
667 | - update Patch1000: clang-3.5.0-driver-ld.gold.patch |
---|
668 | - update Patch1001: clang-3.5.0-driver-lib64.patch |
---|
669 | - update Patch1002: clang-3.5.0-driver-vine.patch |
---|
670 | |
---|
671 | * Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1 |
---|
672 | - update to 3.5.0 |
---|
673 | - remove Patch11 (clang-hardfloat-hack.patch) |
---|
674 | |
---|
675 | * Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2 |
---|
676 | - rebuild with libffi-3.0.13 |
---|
677 | |
---|
678 | * Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1 |
---|
679 | - update to 3.3 |
---|
680 | |
---|
681 | * Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2 |
---|
682 | - ld.gold (patch1000,1001) |
---|
683 | - add /%{_lib} to ld search path |
---|
684 | - add support *-vine-linux gcc (patch1002) |
---|
685 | |
---|
686 | * Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1 |
---|
687 | - update to 3.1 |
---|
688 | |
---|
689 | * Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1 |
---|
690 | - updated to 3.0 release |
---|
691 | |
---|
692 | * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3 |
---|
693 | - added patch 2-4 to support -O4 link-time optimization |
---|
694 | |
---|
695 | * Fri Sep 9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2 |
---|
696 | - disable -fno-var-tracking-assignments on ppc |
---|
697 | (seems like gcc-4.4.5 still doesn't support this) |
---|
698 | |
---|
699 | * Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1 |
---|
700 | - new upstream release |
---|
701 | - add BR: libffi-devel |
---|
702 | - add R: libffi-devel to -devel |
---|
703 | |
---|
704 | * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1 |
---|
705 | - initial build for Vine Linux |
---|
706 | |
---|
707 | * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1 |
---|
708 | - Update to final 2.7 release |
---|
709 | |
---|
710 | * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1 |
---|
711 | - Update to first 2.7 pre-release |
---|
712 | |
---|
713 | * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2 |
---|
714 | - Update to 2.6 pre-release2 |
---|
715 | - -devel subpackage now virtually provides -static |
---|
716 | |
---|
717 | * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1 |
---|
718 | - Disable var tracking assignments on PPC |
---|
719 | |
---|
720 | * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1 |
---|
721 | - Don't adjust clang include dir; files there are noarch (bz#521893) |
---|
722 | - Enable clang unit tests |
---|
723 | - clang and clang-analyzer renamed; no longer depend on llvm at runtime |
---|
724 | |
---|
725 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1 |
---|
726 | - Package Clang's static analyzer tools |
---|
727 | |
---|
728 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1 |
---|
729 | - PIC is now enabled by default; explicitly disable on %%{ix86} |
---|
730 | |
---|
731 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1 |
---|
732 | - First 2.6 prerelease |
---|
733 | - Enable Clang front-end |
---|
734 | - Enable debuginfo generation |
---|
735 | |
---|
736 | * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6 |
---|
737 | - Disable assertions (needed by OpenGTL, bz#521261) |
---|
738 | - Align spec file with upstream build instructions |
---|
739 | - Enable unit tests |
---|
740 | |
---|
741 | * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5 |
---|
742 | - Only disable PIC on %%ix86; ppc actually needs it |
---|
743 | |
---|
744 | * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4 |
---|
745 | - Disable use of position-independent code on 32-bit platforms |
---|
746 | (buggy in LLVM <= 2.5) |
---|
747 | |
---|
748 | * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3 |
---|
749 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
750 | |
---|
751 | * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2 |
---|
752 | - Remove build scripts; they require the build directory to work |
---|
753 | |
---|
754 | * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1 |
---|
755 | - Update to 2.5 |
---|
756 | - Package build scripts (bug #457881) |
---|
757 | |
---|
758 | * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2 |
---|
759 | - Patched build process for the OCaml binding |
---|
760 | |
---|
761 | * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1 |
---|
762 | - Update to 2.4 |
---|
763 | - Package Ocaml binding |
---|
764 | |
---|
765 | * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2 |
---|
766 | - Add dependency on groff |
---|
767 | |
---|
768 | * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1 |
---|
769 | - LLVM 2.3 |
---|
770 | |
---|
771 | * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4 |
---|
772 | - fix license tags |
---|
773 | |
---|
774 | * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3 |
---|
775 | - Fix compilation problems with gcc 4.3 |
---|
776 | |
---|
777 | * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2 |
---|
778 | - Autorebuild for GCC 4.3 |
---|
779 | |
---|
780 | * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2 |
---|
781 | - Fix review comments |
---|
782 | |
---|
783 | * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1 |
---|
784 | - Initial version |
---|