ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/llvm.spec
(Generate patch)

Comparing COMP/CMSDIST/llvm.spec (file contents):
Revision 1.1 by elmer, Tue Apr 7 14:20:15 2009 UTC vs.
Revision 1.4 by elmer, Fri Sep 11 16:57:11 2009 UTC

# Line 1 | Line 1
1   ### RPM external llvm 2.5
2 + ## NOCOMPILER
3 + ## INITENV +PATH LD_LIBRARY_PATH %i/lib64
4 + ## INITENV SET GCC_ROOT %i
5 +
6   Source0: http://llvm.org/releases/%realversion/%n-gcc-4.2-%realversion.source.tar.gz
7   Source1: http://llvm.org/releases/%realversion/%n-%realversion.tar.gz
8   %define gmpVersion 4.2.1
9   %define mpfrVersion 2.2.1
10 + %define tmpgccVersion 4.2.2
11   Source2: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmpVersion}.tar.bz2
12   Source3: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2
13 + Source4: ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-%tmpgccVersion/gcc-%tmpgccVersion.tar.bz2
14  
15   %prep
16   %setup -T -b 0 -n llvm-gcc4.2-%realversion.source
# Line 37 | Line 43 | EOF_T_CMS
43   %setup -D -T -b 1 -n llvm-%realversion
44   %setup -D -T -b 2 -n gmp-%{gmpVersion}
45   %setup -D -T -b 3 -n mpfr-%{mpfrVersion}
46 + %setup -D -T -b 4 -n gcc-%{tmpgccVersion}
47  
48   %build
49   %define gcc4opts %{nil}
# Line 51 | Line 58 | make %makeprocesses
58   make install
59   %define gcc4opts --with-gmp=%i/tmp/gmp --with-mpfr=%i/tmp/mpfr
60  
61 < # Build llvm
62 < cd ..
61 > # build a temporary gcc (c,c++ only) to use for the build
62 > cd ../gcc-%tmpgccVersion
63 > mkdir -p obj
64 > cd obj
65 > CC="gcc $CCOPTS" \
66 > ../configure --prefix=%i/tmp/gcc \
67 >  --enable-languages=c,c++ %gcc4opts --enable-shared
68 > make %makeprocesses bootstrap
69 > make install
70 > find %i/tmp/gcc/lib %i/tmp/gcc/lib32 %i/tmp/gcc/lib64 -name '*.la' -exec rm -f {} \; || true
71 >
72 >
73 > # Build llvm using the temp gcc
74 > export CC=%i/tmp/gcc/bin/gcc
75 > export CXX=%i/tmp/gcc/bin/g++
76 > export PATH=%i/tmp/gcc/bin:$PATH
77 > export LD_LIBRARY_PATH=%i/tmp/gcc/lib64:%i/tmp/gcc/lib:$LD_LIBRARY_PATH
78 > export GCC_VERSION=%{tmpgccVersion}
79 > export GCC_ROOT=%i/tmp/gcc
80 > export GCC_REVISION=1
81 > cd ../..
82   mkdir llvm-objects
83   cd llvm-objects
84   ../llvm-%realversion/configure --prefix=%i --enable-optimized
# Line 66 | Line 92 | make %makeprocesses
92   make install
93  
94   %install
95 + # Clean up the temporary builds of mpfr and gmp (which had only .a libs)
96 + # and gcc (which should no longer be needed)
97 + rm -fR %i/tmp
98 + # Fix up a perl path
99 + perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' %i/bin/llvm-config
100   # SCRAM ToolBox toolfile
101   mkdir -p %i/etc/scram.d
102   cat << \EOF_TOOLFILE >%i/etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines