]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- builds without gcc source
[packages/llvm.git] / llvm.spec
CommitLineData
bc88141a
ER
1# TODO
2# - gcc/c++ packages: http://cvs.fedoraproject.org/viewvc/rpms/llvm/devel/llvm.spec?revision=HEAD&view=markup
3#
4# Conditional build:
5%bcond_with ocaml # build without OCaml bindings
6%bcond_with gcc # build without gcc
7#
8%define lgcc_version 4.2
aa11c230 9Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
2326a99f 10Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
aa11c230 11Name: llvm
633c6443 12Version: 2.3
aa11c230 13Release: 0.1
14License: University of Illinois/NCSA Open Source License
15Group: Development/Languages
aa11c230 16Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tar.gz
633c6443 17# Source0-md5: 17254d72863b7fa005f3fb327aea3439
bc88141a
ER
18Source1: http://llvm.org/releases/%{version}/%{name}-gcc-%{lgcc_version}-%{version}.source.tar.gz
19# Source1-md5: 18aa4f8226ddab58af2f12cff135470d
aa11c230 20Patch0: %{name}-dirs.patch
2326a99f 21URL: http://llvm.org/
bc88141a 22BuildRequires: bash
2326a99f 23BuildRequires: gcc >= 5:3.4
bc88141a
ER
24BuildRequires: libltdl-devel
25%{?with_ocaml:BuildRequires: ocaml}
356a0bbd
ER
26# gcc4 might be installed, but not current __cc
27%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
28BuildRequires: __cc >= 3.4
29%endif
aa11c230 30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
356a0bbd 32%define _sysconfdir /etc/%{name}
021b3c3d 33
aa11c230 34%description
35LLVM is a compiler infrastructure designed for compile-time,
36link-time, runtime, and idle-time optimization of programs from
37arbitrary programming languages. LLVM is written in C++ and has been
38developed since 2000 at the University of Illinois and Apple. It
39currently supports compilation of C and C++ programs, using front-ends
40derived from GCC 4.0.1. A new front-end for the C family of languages
41is in development. The compiler infrastructure includes mirror sets of
42programming tools as well as libraries with equivalent functionality.
43
2326a99f
JB
44%description -l pl.UTF-8
45LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
46czasu kompilowania, linkowania, działania i bezczynności programów w
47dowolnych językach programowania. Jest napisana w C++, rozwijana od
48roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
49kompilację programów w C i C++ przy użyciu frontendów wywodzących się
50z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
51rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
52narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
53funkcjonalnością.
54
bc88141a
ER
55%package doc
56Summary: Documentation for LLVM
57Group: Documentation
58Requires: %{name} = %{version}-%{release}
59
60%description doc
61Documentation for the LLVM compiler infrastructure.
62
63%package devel
64Summary: Libraries and header files for LLVM
65Group: Development/Languages
66Requires: %{name} = %{version}-%{release}
67Requires: libstdc++-devel >= 6:3.4
68
69%description devel
70This package contains library and header files needed to develop new
71native programs that use the LLVM infrastructure.
72
73%package gcc
74Summary: C compiler for LLVM
75License: GPL+
76Group: Development/Languages
77Requires: %{name} = %{version}-%{release}
78
79%description gcc
80C compiler for LLVM.
81
82%package gcc-c++
83Summary: C++ compiler for LLVM
84License: GPL+
85Group: Development/Languages
86Requires: %{name}-gcc = %{version}-%{release}
87
88%description gcc-c++
89C++ compiler for LLVM.
90
91%package ocaml
92Summary: OCaml binding for LLVM
93Group: Development/Libraries
94Requires: %{name} = %{version}-%{release}
95%requires_eq ocaml-runtime
96
97%description ocaml
98OCaml binding for LLVM.
99
100%package ocaml-devel
101Summary: Development files for %{name}-ocaml
102Group: Development/Libraries
103Requires: %{name}-devel = %{version}-%{release}
104Requires: %{name}-ocaml = %{version}-%{release}
105
106%description ocaml-devel
107The %{name}-ocaml-devel package contains libraries and signature files
108for developing applications that use %{name}-ocaml.
109
aa11c230 110%prep
bc88141a 111%setup -q %{?with_gcc:-a1}
aa11c230 112%patch0 -p0
113
114%build
bc88141a
ER
115# bash specific 'test a < b'
116bash %configure \
117 --libdir=%{_libdir}/%{name} \
118 --datadir=%{_datadir}/%{name}-%{version} \
119 --enable-bindings=%{!?with_ocaml:no}%{?with_ocaml:ocaml} \
120 --disable-static \
121 --enable-assertions \
122 --enable-debug-runtime \
123 --enable-jit \
aa11c230 124 --enable-optimized \
bc88141a
ER
125 --enable-shared \
126 --with-pic
127
128%{__make} OPTIMIZE_OPTION="%{rpmcflags}"
129
130%if %{with gcc}
131# Build llvm-gcc.
aa11c230 132
bc88141a
ER
133export PATH=%{_builddir}/%{?buildsubdir}/Release/bin:$PATH
134
135install -d llvm-gcc%{lgcc_version}-%{version}.source/build
136cd llvm-gcc%{lgcc_version}-%{version}.source/build
137../configure \
138 --host=%{_host} \
139 --build=%{_build} \
140 --target=%{_target_platform} \
141 --prefix=%{_libdir}/llvm-gcc \
142 --libdir=%{_libdir}/llvm-gcc/%{_lib} \
143 --enable-threads \
144 --disable-nls \
145%ifarch %{x8664}
146 --disable-multilib \
147 --disable-shared \
148%endif
149 --enable-languages=c,c++ \
150 --enable-llvm=%{_builddir}/%{?buildsubdir} \
151 --program-prefix=llvm-
152
153%{__make} LLVM_VERSION_INFO=%{version}
154%endif
aa11c230 155
156%install
157rm -rf $RPM_BUILD_ROOT
158
159%{__make} install \
160 DESTDIR=$RPM_BUILD_ROOT
161
bc88141a 162find $RPM_BUILD_ROOT -name .dir | xargs rm -fv
021b3c3d 163
aa11c230 164%clean
165rm -rf $RPM_BUILD_ROOT
166
2326a99f
JB
167%post -p /sbin/ldconfig
168%postun -p /sbin/ldconfig
aa11c230 169
170%files
171%defattr(644,root,root,755)
bc88141a 172%doc CREDITS.TXT LICENSE.TXT README.txt
a9beeab5
JB
173%attr(755,root,root) %{_bindir}/bugpoint
174%attr(755,root,root) %{_bindir}/gccas
175%attr(755,root,root) %{_bindir}/gccld
176%attr(755,root,root) %{_bindir}/llc
177%attr(755,root,root) %{_bindir}/lli
a9beeab5 178%attr(755,root,root) %{_bindir}/opt
bc88141a
ER
179%attr(755,root,root) %{_bindir}/llvmc2
180%attr(755,root,root) %{_bindir}/llvm-*
181%exclude %attr(755,root,root) %{_bindir}/llvm-config
a9beeab5
JB
182%{_mandir}/man1/bugpoint.1*
183%{_mandir}/man1/llc.1*
184%{_mandir}/man1/lli.1*
185%{_mandir}/man1/llvm-*.1*
a9beeab5
JB
186%{_mandir}/man1/llvmgcc.1*
187%{_mandir}/man1/llvmgxx.1*
188%{_mandir}/man1/opt.1*
189%{_mandir}/man1/stkrc.1*
190%{_mandir}/man1/tblgen.1*
bc88141a
ER
191
192%files doc
193%defattr(644,root,root,755)
194%doc docs/*.{html,css} docs/img examples
195
196%files devel
197%defattr(644,root,root,755)
198%attr(755,root,root) %{_bindir}/llvm-config
199%{_includedir}/llvm
200%{_includedir}/llvm-c
201%{_libdir}/LLVM*.o
202%{_libdir}/libLLVM*.a
203# just example?
204%attr(755,root,root) %{_libdir}/LLVMHello.so*
205%{_libdir}/LLVMHello.la
206
207%if %{with gcc}
208%files gcc
209%defattr(644,root,root,755)
210%attr(755,root,root) %{_bindir}/llvm2cpp
211%attr(755,root,root) %{_bindir}/llvmc
212%dir %{_sysconfdir}
213%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/c
214%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/cpp
215%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/ll
216%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/st
217%{_mandir}/man1/llvm2cpp.1*
218%{_mandir}/man1/llvmc.1*
219
220%files gcc-c++
221%defattr(644,root,root,755)
222%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/c++
223%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/cxx
224%endif
This page took 0.091076 seconds and 4 git commands to generate.