Revision: | 1.24 |
Committed: | Wed Jun 27 12:50:44 2007 UTC (17 years, 10 months ago) by elmer |
Branch: | MAIN |
CVS Tags: | CRABSERVER_TEST_BUILD_V4, CRABSERVER_TEST_BUILD_V3, CRABSERVER_TEST_BUILD_V2, CRABSERVER_TEST_BUILD_V1, forCRABSERVER104test, forCRABSERVER103, PRODAGENT_0_10_12_V9, PRODAGENT_0_10_12_V8, PRODAGENT_0_10_12_V7, PRODAGENT_0_10_12_V6, PRODAGENT_0_10_12_V5, PRODAGENT_0_10_12_V4, forCS102pre4, PRODAGENT_0_10_12_V3, PRODAGENT_0_10_12_V2, PRODAGENT_0_10_12, nr080626_for1612flt, CMSSW_1_6_12, apFor1612v0, apFor1612p3v0, CMSSW_1_6_12_pre2, apFor1612p2v1, apFor1612p2v0, CMSSW_1_6_12_pre1, PRODAGENT_0_10_3, PRODAGENT_0_10_3_20080521, apFor1612p1v1, apFor1612p1v0, CMSSW_1_6_11, apFor1611v0, PRODAGENT_0_8_3_SL4, apFor1611p1v1, apFor1611p1v0, CMSSW_1_6_10, apFor1610v0, CMSSW_1_6_10_pre2, CMSSW_1_6_10_pre1, apFor1610p2v0, apFor1610p1v2, forPA070pre3-slc4, forPA070pre3-slc, CMSSW_1_6_8_FWLITE-root51800, apFor1610p1v1, CMSSW_1_6_9, apFor169v1, CMSSW_1_6_9_pre2, nr080124fwl168a, apFor169p2v2, apFor169p2v1, apFor169p2v0, ap20080116d, ap20080116c, ap20080116b, ap20080116a, ap20080115d, ap20080115c, ap20080115b, ap20080115a, ap20080114b, ap20080114a, CMSSW_1_6_9_pre1, apFor169p1, apFor169p1v5, apFor169p1v4, apFor169p1v3, apFor169p1v2, apFor169p1v1, apFor169p1v0, apFor169v0, CMSSW_1_6_8, CMSSW_1_6_8_pre2_FWLITE-root51706, apFor168, CMSSW_1_6_8_pre2, apFor168p2, CMSSW_1_6_8_pre1, apFor168p1, CMSSW_1_6_7_FWLITE, nr071026_fwlite167, nr071025_fwlite167, CMSSW_1_6_7, pe20071019a-for167, CMSSW_1_6_6, forPA060pre7-slc4, pe20071013a-for166p2, nr20071011-bootstrap, pe20071011a-for166, pe20071009a-for166p1, CMSSW_1_6_5, pe20071006a-for165, CMSSW_1_6_5_pre2, pe20071005a-for165p2, CMSSW_1_6_5_pre1, pe20070930b-for165p1, pe20070930a-for165p1, CMSSW_1_6_4, pe20070929a-for164, nr20070926-bootstrap, CMSSW_1_6_3, pe20070928a-for16Xdpm, pe20070926a-for163, CMSSW_1_6_2, ap-20070925, pe20070925a-for162, CMSSW_1_6_2_pre1, pe20070922a-for162p1, CMSSW_1_6_1, pe20070922g-for161p2, pe20070922f-for161p2, pe20070922e-for161p2, pe20070922d-for161p2, pe20070922c-for161p2, pe20070922b-for161p2, pe20070922a-for161p2, CMSSW_1_6_1_pre1, CMSSW_1_6_0, CMSSW_1_6_0_pre14, pe20070831d-160p14, pe20070831c-160p14, pe20070831b-160p14, pe20070831a-160p14, pe20070830a-160p14, CMSSW_1_7_0_pre1, dl070829, CMSSW_1_6_0_DAQ3, CMSSW_1_6_0_pre13, dl070828t2, dl070828, dl070827, dl070826, pe20070826a-160p13, CMSSW_1_6_0_pre12, dl070824, pe20070824b-160p12, pe20070824-160p12, pe20070823-160p12, CMSSW_1_6_0_pre11, CMSSW_1_6_0_pre10, ge20070810-ptc, CMSSW_1_6_0_pre9, CMSSW_1_6_0_pre8, CMSSW_1_6_0_pre7, dl070730, cms160daq1_zhen2, cms160daq1_zhen1, ge20070730-cmsbuild, ge20070729-amd64, CMSSW_1_6_0_pre6, pe20070727-160p6, CMSSW_1_6_0_DAQ1, nr20070723_fwlite160p5, ap20070723, CMSSW_1_6_0_pre5, dl070721, dl070720_160daq1_1, pe20070720-160daq1, pe20070720-160p5, ge20070718, ge20070717, ap20070717, ge20070713-macosx, ap20070712, ge20070712-migration, ge20070712, ge20070711-prodcommon, CMSSW_1_6_0_pre4, ge20070710-formencode, ge20070709-macosx, ge20070709a-macosx, ge20070706-macosx, ap20070706, CMSSW_1_6_0_pre3, pe20070705a-160p3, CMSSW_1_6_0_pre2, ge20070705, ge20070704, ge20070703b, pe20070702b-160p3, pe20070702b-160p2, ge20070702-rpm-webtools, CMSSW_1_6_0_pre1, pe20070729b-160p2, pe20070729b-160p1, pe20070729a-160p2, pe20070729a-160p1, pe20070629a-ports, pe20070628e-ports, pe20070628d-ports, pe20070628c-ports, pe20070628b-ports, pe20070628a-ports, pe20070627b-ports, pe20070627a-ports |
Changes since 1.23: | +1 -1 lines |
Log Message: | Update to -CMS3 for full rebuild |
# | User | Rev | Content |
---|---|---|---|
1 | elmer | 1.24 | ### RPM external gcc 3.4.5-CMS3 |
2 | eulisse | 1.3 | ## INITENV +PATH LD_LIBRARY_PATH %i/lib/32 |
3 | eulisse | 1.16 | ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 |
4 | elmer | 1.12 | ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) true ;; esac |
5 | dlange | 1.17 | Source0: ftp://ftp.fu-berlin.de/unix/gnu/%n/%n-%realversion/%n-%realversion.tar.bz2 |
6 | eulisse | 1.16 | %define binutilsv 2.17 |
7 | Source1: http://ftp.gnu.org/gnu/binutils/binutils-%binutilsv.tar.bz2 | ||
8 | eulisse | 1.18 | |
9 | # If gcc version >= 4.0.0, we need two additional sources, for gmp and mpfr, | ||
10 | # and we set the fortranCompiler macro (which is going to be used by the | ||
11 | # --enable-languages option of gcc's configure) to gfortran. | ||
12 | # Notice that we need to build those twice: once using the system compiler | ||
13 | # and the using the newly built gcc. | ||
14 | %define gmpVersion 4.2.1 | ||
15 | %define mpfrVersion 2.2.1 | ||
16 | Source2: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmpVersion}.tar.bz2 | ||
17 | Source3: http://www.mpfr.org/mpfr-current/mpfr-%{mpfrVersion}.tar.bz2 | ||
18 | |||
19 | eulisse | 1.11 | %define cpu %(echo %cmsplatf | cut -d_ -f2) |
20 | eulisse | 1.16 | %prep |
21 | dlange | 1.17 | %setup -T -b 0 -n gcc-%realversion |
22 | dlange | 1.15 | |
23 | eulisse | 1.16 | %if "%cmsos" == "slc4_ia32" |
24 | cat << \EOF_CONFIG_GCC >> gcc/config.gcc | ||
25 | # CMS patch to include gcc/config/i386/t-cms when building gcc | ||
26 | tm_file="$tm_file i386/cms.h" | ||
27 | tmake_file="$tmake_file i386/t-cms" | ||
28 | EOF_CONFIG_GCC | ||
29 | |||
30 | cat << \EOF_CMS_H > gcc/config/i386/cms.h | ||
31 | eulisse | 1.20 | #undef ASM_SPEC |
32 | eulisse | 1.16 | #define ASM_SPEC "%%{v:-V} %%{Qy:} %%{!Qn:-Qy} %%{n} %%{T} %%{Ym,*} %%{Yd,*} %%{Wa,*:%%*} --32" |
33 | eulisse | 1.20 | #undef CC1_SPEC |
34 | eulisse | 1.16 | #define CC1_SPEC "%%(cc1_cpu) %%{profile:-p} -m32" |
35 | eulisse | 1.20 | #undef CC1PLUS_SPEC |
36 | eulisse | 1.16 | #define CC1PLUS_SPEC "-m32" |
37 | eulisse | 1.20 | #undef MULTILIB_DEFAULTS |
38 | eulisse | 1.16 | #define MULTILIB_DEFAULTS { "m32" } |
39 | EOF_CMS_H | ||
40 | |||
41 | cat << \EOF_T_CMS > gcc/config/i386/t-cms | ||
42 | MULTILIB_OPTIONS = m32 | ||
43 | MULTILIB_DIRNAMES = ../lib | ||
44 | MULTILIB_MATCHES = m32=m32 | ||
45 | EOF_T_CMS | ||
46 | %endif | ||
47 | dlange | 1.15 | |
48 | eulisse | 1.16 | %setup -D -T -b 1 -n binutils-%binutilsv |
49 | eulisse | 1.18 | %setup -D -T -b 2 -n gmp-%{gmpVersion} |
50 | %setup -D -T -b 3 -n mpfr-%{mpfrVersion} | ||
51 | |||
52 | argiro | 1.1 | %build |
53 | eulisse | 1.20 | # Set special variables required to build 32-bit executables on 64-bit |
54 | # systems. Note that if the architecture is SLC4/IA32, we may be on a | ||
55 | # 64-bit system and need to produce a 32-bit capable compiler, which | ||
56 | # _itself_ is a 32-bit executable. | ||
57 | case $(uname -m):%{cmsos} in | ||
58 | *:slc4_ia32 ) | ||
59 | CCOPTS="-m32 -Wa,--32" ;; | ||
60 | * ) | ||
61 | CCOPTS="" ;; | ||
62 | esac | ||
63 | |||
64 | # If requested, build our own binutils. Currently the default is to use | ||
65 | # the system binutils. | ||
66 | %if "%{?use_external_binutils:set}" == "set" | ||
67 | cd ../binutils-%{binutilsv} | ||
68 | CC="gcc $CCOPTS" ./configure --prefix=%i | ||
69 | make %makeprocesses | ||
70 | make install | ||
71 | eulisse | 1.18 | %endif |
72 | eulisse | 1.16 | |
73 | eulisse | 1.20 | # Build GMP/MPFR for GCC 4.x |
74 | eulisse | 1.19 | cd ../gmp-%{gmpVersion} |
75 | eulisse | 1.20 | CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/gmp --disable-shared |
76 | eulisse | 1.19 | make %makeprocesses |
77 | eulisse | 1.20 | make install |
78 | eulisse | 1.19 | |
79 | cd ../mpfr-%{mpfrVersion} | ||
80 | eulisse | 1.20 | CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/mpfr --with-gmp=%i/tmp/gmp --disable-shared |
81 | eulisse | 1.19 | make %makeprocesses |
82 | |||
83 | eulisse | 1.20 | # Build the compilers |
84 | elmer | 1.21 | cd ../gcc-%realversion |
85 | eulisse | 1.18 | mkdir -p obj |
86 | cd obj | ||
87 | eulisse | 1.20 | CC="gcc $CCOPTS" \ |
88 | ../configure --prefix=%i \ | ||
89 | --enable-languages=c,c++,`case %v in 3.*) echo f77;; *) echo fortran;; esac` \ | ||
90 | --with-gmp-dir=%_builddir/gmp-%{gmpVersion} \ | ||
91 | --with-mpfr-dir=%_builddir/mpfr-%{mpfrVersion} \ | ||
92 | --enable-shared | ||
93 | eulisse | 1.18 | |
94 | make %makeprocesses bootstrap | ||
95 | eulisse | 1.16 | |
96 | argiro | 1.1 | %install |
97 | elmer | 1.21 | cd %_builddir/gcc-%{realversion}/obj && make install |
98 | argiro | 1.1 | ln -s gcc %i/bin/cc |
99 | eulisse | 1.20 | find %i/lib %i/lib32 %i/lib64 -name '*.la' -exec rm -f {} \; || true |
100 | |||
101 | eulisse | 1.9 | %post |
102 | eulisse | 1.20 | # %{relocateConfig}lib/libg2c.la |
103 | # %{relocateConfig}lib/libstdc++.la | ||
104 | # %{relocateConfig}lib/libsupc++.la | ||
105 | # %if "%cpu" == "amd64" | ||
106 | # %{relocateConfig}lib64/libg2c.la | ||
107 | # %{relocateConfig}lib64/libstdc++.la | ||
108 | # %{relocateConfig}lib64/libsupc++.la | ||
109 | # %{relocateConfig}lib/32/libg2c.la | ||
110 | # %{relocateConfig}lib/32/libstdc++.la | ||
111 | # %{relocateConfig}lib/32/libsupc++.la | ||
112 | # %endif | ||
113 | # %if "%gcc4" == "true" | ||
114 | # %{relocateConfig}lib/libgfortran.la | ||
115 | # %{relocateConfig}lib/libgfortranbegin.la | ||
116 | # %endif |