1 |
< |
### RPM external llvm 2.8 |
2 |
< |
## NOCOMPILER |
1 |
> |
### RPM external llvm 2.9 |
2 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib64 |
3 |
|
|
4 |
+ |
# s/#/S/ to use the official version. |
5 |
|
Source0: http://llvm.org/releases/%realversion/llvm-%realversion.tgz |
6 |
|
Source1: http://llvm.org/releases/%realversion/clang-%realversion.tgz |
7 |
+ |
# SVN builds. Comment out to use the official version. |
8 |
+ |
#Source0: svn://llvm.org/svn/llvm-project/llvm/tags/RELEASE_29/rc3/?scheme=http&module=llvm-%realversion&output=/llvm-%realversion.tgz |
9 |
+ |
#Source1: svn://llvm.org/svn/llvm-project/cfe/tags/RELEASE_29/rc3/?scheme=http&module=clang-%realversion&output=/clang-%realversion.tgz |
10 |
+ |
Patch0: llvm-2.9-custom-gcc |
11 |
|
|
12 |
|
%prep |
13 |
|
%setup -T -b0 -n llvm-%realversion |
14 |
|
%setup -T -D -a1 -c -n llvm-%realversion/tools |
15 |
|
mv clang-%realversion clang |
16 |
+ |
cd clang |
17 |
+ |
case %cmsos in |
18 |
+ |
slc*) |
19 |
+ |
%patch0 -p1 |
20 |
+ |
;; |
21 |
+ |
esac |
22 |
|
%setup -T -D -n llvm-%realversion |
13 |
– |
pwd |
23 |
|
|
24 |
|
%build |
16 |
– |
pwd |
25 |
|
mkdir objs ; cd objs |
26 |
|
../configure --prefix=%i --enable-optimized |
27 |
|
make %makeprocesses |
31 |
|
make install |
32 |
|
# Fix up a perl path |
33 |
|
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' %i/bin/llvm-config |
34 |
+ |
|
35 |
+ |
case %cmsos in |
36 |
+ |
osx*) |
37 |
+ |
#Fix up install names for some of the libraries. |
38 |
+ |
for x in BugpointPasses.dylib profile_rt.dylib LLVMHello.dylib |
39 |
+ |
do |
40 |
+ |
install_name_tool -change $x lib$x -id lib$x %i/lib/lib$x |
41 |
+ |
done |
42 |
+ |
;; |
43 |
+ |
esac |