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.2 by elmer, Wed Sep 9 14:43:18 2009 UTC vs.
Revision 1.9 by eulisse, Wed Mar 30 12:19:05 2011 UTC

# Line 1 | Line 1
1 < ### RPM external llvm 2.5
2 < Source0: http://llvm.org/releases/%realversion/%n-gcc-4.2-%realversion.source.tar.gz
3 < Source1: http://llvm.org/releases/%realversion/%n-%realversion.tar.gz
4 < %define gmpVersion 4.2.1
5 < %define mpfrVersion 2.2.1
6 < Source2: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmpVersion}.tar.bz2
7 < Source3: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2
1 > ### RPM external llvm 2.9rc3
2 > ## INITENV +PATH LD_LIBRARY_PATH %i/lib64
3  
4 < %prep
5 < %setup -T -b 0 -n llvm-gcc4.2-%realversion.source
6 <
7 < %if "%cmsos" == "slc4_ia32"
8 < cat << \EOF_CONFIG_GCC >> gcc/config.gcc
9 < # CMS patch to include gcc/config/i386/t-cms when building gcc
10 < tm_file="$tm_file i386/cms.h"
16 < tmake_file="$tmake_file i386/t-cms"
17 < EOF_CONFIG_GCC
18 <
19 < cat << \EOF_CMS_H > gcc/config/i386/cms.h
20 < #undef ASM_SPEC
21 < #define ASM_SPEC  "%%{v:-V} %%{Qy:} %%{!Qn:-Qy} %%{n} %%{T} %%{Ym,*} %%{Yd,*} %%{Wa,*:%%*} --32"
22 < #undef CC1_SPEC
23 < #define CC1_SPEC  "%%(cc1_cpu) %%{profile:-p} -m32"
24 < #undef CC1PLUS_SPEC
25 < #define CC1PLUS_SPEC "-m32"
26 < #undef MULTILIB_DEFAULTS
27 < #define MULTILIB_DEFAULTS { "m32" }
28 < EOF_CMS_H
29 <
30 < cat << \EOF_T_CMS > gcc/config/i386/t-cms
31 < MULTILIB_OPTIONS = m32
32 < MULTILIB_DIRNAMES = ../lib
33 < MULTILIB_MATCHES = m32=m32
34 < EOF_T_CMS
35 < %endif
4 > # s/#/S/ to use the official version.
5 > #ource0: http://llvm.org/releases/%realversion/llvm-%realversion.tgz
6 > #ource1: 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.9rc3-custom-gcc
11  
12 < %setup -D -T -b 1 -n llvm-%realversion
13 < %setup -D -T -b 2 -n gmp-%{gmpVersion}
14 < %setup -D -T -b 3 -n mpfr-%{mpfrVersion}
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
23  
24   %build
25 < %define gcc4opts %{nil}
26 < # Build GMP/MPFR for GCC 4.x
44 < cd ../gmp-%{gmpVersion}
45 < CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/gmp --disable-shared
46 < make %makeprocesses
47 < make install
48 < cd ../mpfr-%{mpfrVersion}
49 < CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/mpfr --with-gmp=%i/tmp/gmp --disable-shared
25 > mkdir objs ; cd objs
26 > ../configure --prefix=%i --enable-optimized
27   make %makeprocesses
51 make install
52 %define gcc4opts --with-gmp=%i/tmp/gmp --with-mpfr=%i/tmp/mpfr
53
54 # Build llvm
55 cd ..
56 mkdir llvm-objects
57 cd llvm-objects
58 ../llvm-%realversion/configure --prefix=%i --enable-optimized
59 make %makeprocesses
60 make install
61 # Build the llvm-gcc front-end
62 cd ../llvm-gcc4.2-%realversion.source
63 ./configure --prefix=%i %gcc4opts --enable-llvm=`pwd`/../llvm-objects --enable-languages=c,c++
64 rm GNUmakefile
65 make %makeprocesses
66 make install
28  
29   %install
30 + cd objs
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
71 # SCRAM ToolBox toolfile
72 mkdir -p %i/etc/scram.d
73 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
74 <doc type=BuildSystem::ToolDoc version=1.0>
75 <Tool name=%n version=%v>
76 <lib name=z>
77 <client>
78 <Environment name=ZLIB_BASE default="%i"></Environment>
79 <Environment name=INCLUDE default="$ZLIB_BASE/include"></Environment>
80 <Environment name=LIBDIR  default="$ZLIB_BASE/lib"></Environment>
81 </client>
82 </Tool>
83 EOF_TOOLFILE
34  
35 < %post
36 < %{relocateConfig}etc/scram.d/%n
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines