4 Summary: The Low Level Virtual Machine
5 Group: Development/Languages
8 Source0: llvm-%{version}%{?prerel}.tgz
10 # Data files should be installed with timestamps preserved
11 Patch0: llvm-2.6-timestamp.patch
12 # clang link failure if system GCC version is unknown
13 # http://llvm.org/bugs/show_bug.cgi?id=8897
14 Patch1: clang-2.9-add_gcc_vers.patch
15 # Operator.h incompatibility with GCC 4.6 in C++0x mode
16 # http://llvm.org/bugs/show_bug.cgi?id=9869
17 Patch2: llvm-2.9-PR9869_operator_destructor.patch
20 BuildRequires: chrpath
22 BuildRequires: gcc-c++ >= 3.4
24 BuildRequires: libffi-devel
25 BuildRequires: libtool-ltdl-devel
26 BuildRequires: perl(Pod::Escapes)
27 BuildRequires: perl(Pod::Simple)
28 Requires: libllvm = %{version}-%{release}
32 LLVM is a compiler infrastructure designed for compile-time,
33 link-time, runtime, and idle-time optimization of programs from
34 arbitrary programming languages. The compiler infrastructure includes
35 mirror sets of programming tools as well as libraries with equivalent
40 Summary: Libraries and header files for LLVM
41 Group: Development/Languages
42 Requires: %{name} = %{version}-%{release}
43 Requires: libffi-devel
44 Requires: libstdc++-devel >= 3.4
45 Provides: llvm-static = %{version}-%{release}
47 Requires(posttrans): /usr/sbin/alternatives
48 Requires(postun): /usr/sbin/alternatives
51 This package contains library and header files needed to develop new
52 native programs that use the LLVM infrastructure.
57 Summary: LLVM shared libraries
58 Group: System Environment/Libraries
60 %description -n libllvm
61 Shared libraries for the LLVM compiler infrastructure.
67 %setup -q -n llvm-%{version}
70 %patch0 -p1 -b .timestamp
71 %patch2 -p1 -b .pr9869_operator_destructor
76 --libdir=%{_libdir}/%{name} \
77 --datadir=%{_libdir}/%{name} \
79 --disable-assertions \
80 --enable-debug-runtime \
84 --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \
85 -maxdepth 0 -type d)/include \
86 %if %{__isa_bits} == 64
87 --with-cxx-include-32bit-dir=32 \
89 --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \
90 --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os} \
93 # configure does not properly specify libdir
94 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
96 make %{_smp_mflags} REQUIRES_RTTI=1 \
97 OPTIMIZE_OPTION="%{optflags}"
101 make install DESTDIR=%{buildroot} \
102 PROJ_docsdir=/moredocs
104 # Create ld.so.conf.d entry
105 mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
106 cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF
111 #find %%{buildroot} -name .dir -print0 | xargs -0r rm -f
112 file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
113 file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
115 # Get rid of erroneously installed example files.
116 rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
118 # FIXME file this bug
119 sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
120 %{buildroot}%{_bindir}/llvm-config
122 chmod -x %{buildroot}%{_libdir}/%{name}/*.a
124 find examples -name 'Makefile' | xargs -0r rm -f
128 rm -rf %buildroot/moredocs
130 %post -n libllvm -p /sbin/ldconfig
133 %postun -n libllvm -p /sbin/ldconfig
143 %{_bindir}/macho-dump
145 %doc %{_mandir}/man1/*.1.*
148 %{_bindir}/llvm-config
149 %{_includedir}/%{name}
150 %{_includedir}/%{name}-c
151 %{_libdir}/%{name}/*.a
154 %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
155 %dir %{_libdir}/%{name}
156 %{_libdir}/%{name}/*.so