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.8 by elmer, Wed Jan 26 15:27:15 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.8
2 > ## INITENV +PATH LD_LIBRARY_PATH %i/lib64
3  
4 < %prep
5 < %setup -T -b 0 -n llvm-gcc4.2-%realversion.source
4 > Source0: http://llvm.org/releases/%realversion/llvm-%realversion.tgz
5 > Source1: http://llvm.org/releases/%realversion/clang-%realversion.tgz
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"
11 < 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
36 <
37 < %setup -D -T -b 1 -n llvm-%realversion
38 < %setup -D -T -b 2 -n gmp-%{gmpVersion}
39 < %setup -D -T -b 3 -n mpfr-%{mpfrVersion}
7 > %prep
8 > %setup -T -b0 -n llvm-%realversion
9 > %setup -T -D -a1 -c -n llvm-%realversion/tools
10 > mv clang-%realversion clang
11 > %setup -T -D -n llvm-%realversion
12  
13   %build
14 < %define gcc4opts %{nil}
15 < # 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
50 < 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
14 > mkdir objs ; cd objs
15 > ../configure --prefix=%i --enable-optimized
16   make %makeprocesses
66 make install
17  
18   %install
19 + cd objs
20 + make install
21   # Fix up a perl path
22   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
23  
24 < %post
25 < %{relocateConfig}etc/scram.d/%n
24 > case %cmsos in
25 >  osx*)
26 >    #Fix up install names for some of the libraries.
27 >    for x in BugpointPasses.dylib profile_rt.dylib LLVMHello.dylib
28 >    do
29 >      install_name_tool -change $x lib$x -id lib$x %i/lib/lib$x
30 >    done
31 >  ;;
32 > esac
33 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines