source: projects/specs/trunk/l/llvm/llvm-vl.spec @ 9073

Revision 9073, 15.9 KB checked in by Takemikaduchi, 10 years ago (diff)

GNOME 3.14.1

Line 
1# Build options:
2#
3# --with doxygen
4#   The doxygen docs are HUGE, so they are not built by default.
5%define build_apidoc %{?_with_doxygen:1}%{!?_with_doxygen:0}
6
7Name:           llvm
8Version:        3.5.0
9Release:        1%{?_dist_release}
10Summary:        The Low Level Virtual Machine
11Summary(ja):    LLVM - 低レベルバーチャルマシン
12
13Group:          Development/Languages
14License:        NCSA
15URL:            http://llvm.org/
16Source0:        http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
17Source1:        http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
18Source2:        http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
19
20# multilib fixes
21Source10:        llvm-Config-config.h
22Source11:        llvm-Config-llvm-config.h
23
24# Data files should be installed with timestamps preserved
25Patch0:         llvm-2.6-timestamp.patch
26
27# hack the link flags for the shared libs for speed and memory usage
28Patch21:        llvm-3.2-symbolic-shlib.patch
29
30# Vine Patch
31Patch1000: clang-3.1-driver-ld.gold.patch
32Patch1001: clang-3.1-driver-lib64.patch
33Patch1002: clang-3.3-driver-vine.patch
34
35BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
36
37BuildRequires:  binutils-devel
38BuildRequires:  bison
39BuildRequires:  chrpath
40BuildRequires:  flex
41BuildRequires:  gcc-c++ >= 3.4
42BuildRequires:  groff
43BuildRequires:  libffi-devel
44BuildRequires:  libtool-ltdl-devel
45BuildRequires:  ocaml
46# for DejaGNU test suite
47BuildRequires:  dejagnu tcl python
48%if %{build_apidoc}
49BuildRequires:  doxygen graphviz
50%endif
51Requires:       llvm-libs = %{version}-%{release}
52
53# LLVM is not supported on PPC64
54# http://llvm.org/bugs/show_bug.cgi?id=3729
55ExcludeArch:    ppc64
56
57%description
58LLVM is a compiler infrastructure designed for compile-time,
59link-time, runtime, and idle-time optimization of programs from
60arbitrary programming languages.  The compiler infrastructure includes
61mirror sets of programming tools as well as libraries with equivalent
62functionality.
63
64
65%package devel
66Summary:        Libraries and header files for LLVM
67Summary(ja):    LLVM のライブラリおよびヘッダファイル
68Group:          Development/Languages
69Requires:       %{name} = %{version}-%{release}
70Requires:       libstdc++-devel
71Requires:       libffi-devel
72Provides:       llvm-static = %{version}-%{release}
73
74
75%description devel
76This package contains library and header files needed to develop new
77native programs that use the LLVM infrastructure.
78
79
80%package doc
81Summary:        Documentation for LLVM
82Summary(ja):    LLVM のドキュメント
83Group:          Documentation
84Requires:       %{name} = %{version}-%{release}
85
86%description doc
87Documentation for the LLVM compiler infrastructure.
88
89
90%package libs
91Summary:        LLVM shared libraries
92Summary(ja):    LLVM シェアードライブラリ
93Group:          System Environment/Libraries
94
95%description libs
96Shared libraries for the LLVM compiler infrastructure.
97
98
99%package -n clang
100Summary:        A C language family front-end for LLVM
101Summary(ja):    LLVM の C 言語用フロントエンド
102License:        NCSA
103Group:          Development/Languages
104Requires:       gcc
105%(rpm -q --qf 'Requires: %{name} = %{version}' libstdc++-devel)
106
107%description -n clang
108clang: noun
109    1. A loud, resonant, metallic sound.
110    2. The strident call of a crane or goose.
111    3. C-language family front-end toolkit.
112
113The goal of the Clang project is to create a new C, C++, Objective C
114and Objective C++ front-end for the LLVM compiler. Its tools are built
115as libraries and designed to be loosely-coupled and extensible.
116
117
118%package -n clang-devel
119Summary:        Header files for clang
120Summary(ja):    clang のヘッダファイル
121Group:          Development/Languages
122Requires:       clang = %{version}-%{release}
123
124%description -n clang-devel
125This package contains header files for the Clang compiler.
126
127
128%package -n clang-analyzer
129Summary:        A source code analysis framework
130Summary(ja):    ソースコー分析フレームワーク
131License:        NCSA
132Group:          Development/Languages
133Requires:       clang = %{version}-%{release}
134# not picked up automatically since files are currently not instaled
135# in standard Python hierarchies yet
136Requires:       python
137
138%description -n clang-analyzer
139The Clang Static Analyzer consists of both a source code analysis
140framework and a standalone tool that finds bugs in C and Objective-C
141programs. The standalone tool is invoked from the command-line, and is
142intended to run in tandem with a build of a project or code base.
143
144
145%package -n clang-doc
146Summary:        Documentation for Clang
147Summary(ja):    Clang のドキュメント
148Group:          Documentation
149Requires:       %{name} = %{version}-%{release}
150
151%description -n clang-doc
152Documentation for the Clang compiler front-end.
153
154
155%if %{build_apidoc}
156%package apidoc
157Summary:        API documentation for LLVM
158Summary(ja):    LLVM の API ドキュメント
159Group:          Development/Languages
160Requires:       %{name}-docs = %{version}-%{release}
161
162
163%description apidoc
164API documentation for the LLVM compiler infrastructure.
165%endif
166
167
168%package        ocaml
169Summary:        OCaml binding for LLVM
170Summary(ja):    LLVM の OCaml バインディング
171Group:          Development/Libraries
172Requires:       %{name} = %{version}-%{release}
173Requires:       ocaml
174
175%description    ocaml
176OCaml binding for LLVM.
177
178
179%package        ocaml-devel
180Summary:        Development files for %{name}-ocaml
181Summary(ja):    %{name}-ocaml の開発ファイル
182Group:          Development/Libraries
183Requires:       %{name}-devel = %{version}-%{release}
184Requires:       %{name}-ocaml = %{version}-%{release}
185Requires:       ocaml
186
187%description    ocaml-devel
188The %{name}-ocaml-devel package contains libraries and signature files
189for developing applications that use %{name}-ocaml.
190
191
192%package ocaml-doc
193Summary:        Documentation for %{name}-ocaml
194Summary(ja):    %{name}-ocaml のドキュメント
195Group:          Documentation
196Requires:       %{name}-ocaml = %{version}-%{release}
197
198%description ocaml-doc
199HTML documentation for LLVM's OCaml binding.
200
201
202
203%prep
204%setup -q -n llvm-%{version}.src -a1 -a2
205rm -f tools/clang
206mv cfe-%{version}.src tools/clang
207
208# llvm patches
209%patch0 -p1 -b .timestamp
210
211# fix llvm-config --libs
212%patch21 -p1 -b .orig
213
214#%patch1000 -p1 -b .driver-ld.gold
215#%ifarch x86_64
216#%patch1001 -p1 -b .driver-lib64
217#%endif
218#%patch1002 -p1 -b .driver-vine
219
220# fix ld search path
221sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \
222    ./configure
223   
224
225%build
226export CC=/usr/bin/gcc
227export CXX=/usr/bin/g++
228
229# Disabling assertions now, rec. by pure and needed for OpenGTL
230# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
231%configure \
232  --prefix=%{_prefix} \
233  --libdir=%{_libdir}/%{name} \
234  --datadir=%{_libdir}/%{name} \
235%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
236  --enable-doxygen \
237%endif
238%ifarch armv7hl armv7l
239  --with-cpu=cortex-a8 \
240  --with-tune=cortex-a8 \
241  --with-arch=armv7-a \
242  --with-float=hard \
243  --with-fpu=vfpv3-d16 \
244  --with-abi=aapcs-linux \
245%endif
246  --enable-targets=host \
247  --disable-assertions \
248  --enable-optimized \
249  --enable-jit \
250  --enable-libffi \
251  --enable-shared \
252  --enable-pic \
253  --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \
254  --with-binutils-include=%{_includedir} \
255  --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx \
256  --enable-experimental-targets=R600
257 
258# FIXME file this
259# configure does not properly specify libdir
260sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
261
262# FIXME upstream need to fix this
263# llvm-config.cpp hardcodes lib in it
264sed -i 's|ActiveLibDir = ActivePrefix + "/lib"|ActiveLibDir = ActivePrefix + "/%{_lib}/%{name}"|g' tools/llvm-config/llvm-config.cpp
265
266make %{_smp_mflags} \
267  REQUIRES_RTTI=1 \
268  OPTIMIZE_OPTION="%{optflags}"
269
270
271%install
272rm -rf %{buildroot}
273
274make install DESTDIR=%{buildroot} \
275     PROJ_docsdir=/moredocs
276
277# multilib fixes
278mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
279
280pushd %{buildroot}%{_includedir}/llvm/Config
281mv config.h config-%{__isa_bits}.h
282cp -p %{SOURCE10} config.h
283mv llvm-config.h llvm-config-%{__isa_bits}.h
284cp -p %{SOURCE11} llvm-config.h
285popd
286
287# Create ld.so.conf.d entry
288mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
289cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF
290%{_libdir}/llvm
291EOF
292
293# Static analyzer not installed by default:
294# http://clang-analyzer.llvm.org/installation#OtherPlatforms
295mkdir -p %{buildroot}%{_libdir}/clang-analyzer
296# create launchers
297for f in scan-{build,view}; do
298  ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
299done
300
301(cd tools/clang/tools && cp -pr scan-{build,view} \
302 %{buildroot}%{_libdir}/clang-analyzer/)
303
304
305# Move documentation back to build directory
306#
307pwd
308mv %{buildroot}/moredocs .
309rm -f moredocs/*.tar.gz
310rm -f moredocs/ocamldoc/html/*.tar.gz
311
312# and separate the apidoc
313%if %{build_apidoc}
314mv moredocs/html/doxygen apidoc
315mv tools/clang/docs/doxygen/html clang-apidoc
316%endif
317
318# And prepare Clang documentation
319#
320mkdir clang-docs
321for f in LICENSE.TXT NOTES.txt README.txt; do
322  ln tools/clang/$f clang-docs/
323done
324rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
325
326
327#find %%{buildroot} -name .dir -print0 | xargs -0r rm -f
328file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
329file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
330#chrpath -d %%{buildroot}/%%{_libexecdir}/clang-cc
331
332# Get rid of erroneously installed example files.
333rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
334
335# FIXME file this bug
336sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
337  %{buildroot}%{_bindir}/llvm-config-%{__isa_bits}
338
339chmod -x %{buildroot}%{_libdir}/%{name}/*.a
340
341# remove documentation makefiles:
342# they require the build directory to work
343find examples -name 'Makefile' | xargs -0r rm -f
344
345
346%check
347make check 2>&1 | tee ../llvm-testlog.txt
348make -C tools/clang/test 2>&1 | tee ../llvm-testlog.txt
349
350
351%clean
352rm -rf %{buildroot}
353
354
355%post libs -p /sbin/ldconfig
356%post -n clang -p /sbin/ldconfig
357
358
359%postun libs -p /sbin/ldconfig
360%postun -n clang -p /sbin/ldconfig
361
362
363%posttrans devel
364# link llvm-config to the platform-specific file;
365# use ISA bits as priority so that 64-bit is preferred
366# over 32-bit if both are installed
367alternatives \
368  --install \
369  %{_bindir}/llvm-config \
370  llvm-config \
371  %{_bindir}/llvm-config-%{__isa_bits} \
372  %{__isa_bits}
373
374%postun devel
375if [ $1 -eq 0 ]; then
376  alternatives --remove llvm-config \
377    %{_bindir}/llvm-config-%{__isa_bits}
378fi
379exit 0
380
381
382%files
383%defattr(-,root,root,-)
384%doc CREDITS.TXT LICENSE.TXT README.txt
385%{_bindir}/bugpoint
386%{_bindir}/llc
387%{_bindir}/lli
388%exclude %{_bindir}/llvm-config-%{__isa_bits}
389%{_bindir}/llvm*
390%{_bindir}/macho-dump
391%{_bindir}/opt
392%exclude %{_mandir}/man1/clang.1.*
393%doc %{_mandir}/man1/*.1.*
394
395%files devel
396%defattr(-,root,root,-)
397%{_bindir}/llvm-config-%{__isa_bits}
398%{_includedir}/%{name}
399%{_includedir}/%{name}-c
400%{_libdir}/%{name}/*.a
401%{_datadir}/%{name}/cmake
402
403%files libs
404%defattr(-,root,root,-)
405%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
406%dir %{_libdir}/%{name}
407%exclude %{_libdir}/%{name}/libclang.so
408%{_libdir}/%{name}/*.so
409
410%files -n clang
411%defattr(-,root,root,-)
412%doc clang-docs/*
413%{_bindir}/clang*
414%{_bindir}/c-index-test
415%{_libdir}/%{name}/libclang.so
416%{_prefix}/lib/clang
417%doc %{_mandir}/man1/clang.1.*
418
419%files -n clang-devel
420%defattr(-,root,root,-)
421%{_includedir}/clang
422%{_includedir}/clang-c
423
424%files -n clang-analyzer
425%defattr(-,root,root,-)
426%{_bindir}/scan-build
427%{_bindir}/scan-view
428%{_libdir}/clang-analyzer
429
430%files -n clang-doc
431%defattr(-,root,root,-)
432%doc tools/clang/docs/*
433
434%files doc
435%defattr(-,root,root,-)
436%doc examples moredocs/html
437
438%files ocaml
439%defattr(-,root,root,-)
440%{_libdir}/ocaml/*.cma
441%{_libdir}/ocaml/*.cmi
442%{_libdir}/ocaml/*.so
443%{_libdir}/ocaml/META.llvm*
444
445%files ocaml-devel
446%defattr(-,root,root,-)
447%{_libdir}/ocaml/*.a
448%{_libdir}/ocaml/*.cmx*
449%{_libdir}/ocaml/*.mli
450
451%files ocaml-doc
452%defattr(-,root,root,-)
453%doc moredocs/ocamldoc/html/*
454
455%if 0%{?_with_doxygen}
456%files apidoc
457%defattr(-,root,root,-)
458%doc apidoc/*
459
460%files -n clang-apidoc
461%defattr(-,root,root,-)
462%doc clang-apidoc/*
463%endif
464
465
466%changelog
467* Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
468- update to 3.5.0
469- remove Patch11 (clang-hardfloat-hack.patch)
470
471* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
472- rebuild with libffi-3.0.13
473
474* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
475- update to 3.3
476
477* Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
478- ld.gold (patch1000,1001)
479- add /%{_lib} to ld search path
480- add support *-vine-linux gcc (patch1002)
481
482* Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
483- update to 3.1
484
485* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
486- updated to 3.0 release
487
488* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
489- added patch 2-4 to support -O4 link-time optimization
490
491* Fri Sep  9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
492- disable -fno-var-tracking-assignments on ppc
493  (seems like gcc-4.4.5 still doesn't support this)
494
495* Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
496- new upstream release
497- add BR: libffi-devel
498- add R: libffi-devel to -devel
499
500* Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
501- initial build for Vine Linux
502
503* Sun May  2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
504- Update to final 2.7 release
505
506* Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
507- Update to first 2.7 pre-release
508
509* Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
510- Update to 2.6 pre-release2
511- -devel subpackage now virtually provides -static
512
513* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
514- Disable var tracking assignments on PPC
515
516* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
517- Don't adjust clang include dir; files there are noarch (bz#521893)
518- Enable clang unit tests
519- clang and clang-analyzer renamed; no longer depend on llvm at runtime
520
521* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
522- Package Clang's static analyzer tools
523
524* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
525- PIC is now enabled by default; explicitly disable on %%{ix86}
526
527* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
528- First 2.6 prerelease
529- Enable Clang front-end
530- Enable debuginfo generation
531
532* Sat Sep  5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
533- Disable assertions (needed by OpenGTL, bz#521261)
534- Align spec file with upstream build instructions
535- Enable unit tests
536
537* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
538- Only disable PIC on %%ix86; ppc actually needs it
539
540* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
541- Disable use of position-independent code on 32-bit platforms
542  (buggy in LLVM <= 2.5)
543
544* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
545- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
546
547* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
548- Remove build scripts; they require the build directory to work
549
550* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
551- Update to 2.5
552- Package build scripts (bug #457881)
553
554* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
555- Patched build process for the OCaml binding
556
557* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
558- Update to 2.4
559- Package Ocaml binding
560
561* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
562- Add dependency on groff
563
564* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
565- LLVM 2.3
566
567* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
568- fix license tags
569
570* Wed Mar  5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
571- Fix compilation problems with gcc 4.3
572
573* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
574- Autorebuild for GCC 4.3
575
576* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
577- Fix review comments
578
579* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
580- Initial version
Note: See TracBrowser for help on using the repository browser.