ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/gcc.spec
Revision: 1.43
Committed: Fri Feb 29 11:01:18 2008 UTC (17 years, 2 months ago) by elmer
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, T0Mon_100216_1, forFrontend-3, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, gcc_for_phedex_slc4_001, T0Mon_091111_1, forPHEDEX-web-20091020, forPHEDEX329, forPHEDEX328, forPHEDEX-web-20091016, forPHEDEX-web-20091014, forPHEDEX327, forPHEDEX-web-20091002, forPHEDEX-web-20090929, forPHEDEX326, webconddb173, condapp173, forPHEDEX325, forPHEDEX324, forPHEDEX323, forPHEDEX322, webconddb172, condapp172, T0Mon_090828_1, forPHEDEX321, T0Mon_090822_1, forPHEDEX-web-20090821, forPHEDEX321pre3, webconddb171, condapp171, forPHEDEX321pre2, forPHEDEX321pre1, forPHEDEX-web-20090722, forPHEDEX320, T0Mon_090715_1, forPHEDEX320pre7, forPHEDEX320pre6, forPHEDEX320pre5, webconddb170, condapp170, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, forPHEDEX320pre4, condapp164b, webconddb164b, forPHEDEX320pre3, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, webconddb164, conapp164, T0Mon_090522_1, forPHEDEX-web-20090520, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, forPHEDEX-web-20090514, forPHEDEX320pre1, T0Mon_090510_1, zx20090506, forPHEDEX-web-services-20090423, T0Mon_090406_1, forPHEDEX-web-services-20090406, T0Mon_090326_1, T0Mon_090325_1, T0Mon_090318_1, T0Mon_090315_1, forPHEDEX313a, T0Mon_090303_1, zx20090224, zx20090219, forPHEDEX313, zx20090217, forPHEDEX-web-services-20090216, zx20090216, forPHEDEX312, T0M_0_0_4, T0M_0_0_3, T0M_0_0_2, zx20090114, sw_20090108, forPHEDEX311, forPHEDEX310, forPHEDEX310pre2, DBS-APPS_20081205, forPHEDEX-web-services-20081205, DBS-APPS_20081204, DBS-APPS_200811204, forPHEDEX310pre1, DBS-APPS_20081126_1, DBS-APPS_20081126, DBS-APPS_20081125, pe20081121a-30Xports, ofctest, testofc, DBS-APPS_20081119, DBS-APPS_20081118, DBS-APPS_20081117, DBS-APPS_20081114_1, DBS-APPS_20081114, DBS-APPS_20081112, DBS-APPS_20081111_1, DBS-APPS_20081110_2, DBS-APPS_20081110_1, WEBTOOLS-APPS_20081110, DBS-APPS_20081110, WEBTOOLS-APPS_20081107_1, WEBTOOLS-APPS_20081107, DBS-APPS_20081107, T0Mon_081107_1, DBS-APPS_20081105, T0Mon_081105_1, DBS-APPS_20081104, WEBTOOLS-APPS_20081031_2, DBS-APPS_20081031_2, DBS-APPS_20081031_1, WEBTOOLS-APPS_20081031_1, WEBTOOLS-APPS_20081031, forPHEDEX307, DBS-APPS_20081024, WEBTOOLS-APPS_20081020_1, WEBTOOLS-APPS_20081020, forFrontend-2, WEBTOOLS-APPS_20081016_2, WEBTOOLS-APPS_20081016_1, WEBTOOLS-APPS_20081016, WEBTOOLS-APPS_20081015, WEBTOOLS-APPS_20081013_1, WEBTOOLS-APPS_20081013, WEBTOOLS-APPS_20081009, WEBTOOLS-APPS_20081008_1, WEBTOOLS-APPS_20081008, forPHEDEX-web-services-20081008, forPHEDEX-web-services-20081007, forPHEDEX-web302_test1, PRODAGENT_0_12_2, forPHEDEX306, forPHEDEX-datasvc120_test1, T0Mon_080926_1, WEBTOOLS-APPS_20080922, T0Mon_080920_2, T0Mon_080920_1, T0Mon_080916_2, forFrontend-1, WEBTOOLS-APPS_20080917, WEBTOOLS-APPS_20080916, WEBTOOLS-APPS_20080915, forPHEDEX305, DBS-APPS_20080910_1, WEBTOOLS-APPS_20080910_1, WEBTOOLS-APPS_20080910, DBS-APPS_20080910, WEBTOOLS-APPS_20080909, DBS-APPS_20080908, T0Mon_080905_1, T0Mon_080905_01, WEBTOOLS-APPS_20080903, T0Mon_080902_2, T0Mon_080902_1, WEBTOOLS-APPS_20080826, zx20080825, T0Mon_080824_1, T0Mon_080823_1, WEBTOOLS-APPS_20080822, WEBTOOLS-APPS_20080821, WEBTOOLS-APPS_20080818_1, WEBTOOLS-APPS_20080818, buildset_V2_8, forPHEDEX-web301, WEBTOOLS-APPS_20080725, WEBTOOLS-APPS_20080724, re-deps-20080722, zx20080718, WEBTOOLS-APPS_20080717, WEBTOOLS-APPS_20080716, WEBTOOLS-APPS_20080715_2, WEBTOOLS-APPS_20080715_1, WEBTOOLS-APPS_20080715, zx20080715, nr080714_forCRAB, WEBTOOLS-APPS_20080713, PRODAGENT_0_10_12_V10, forPHEDEX304, zx20080707, forPHEDEX-web110, re20080627, forPHEDEX-web300, zx20080625, WEBTOOLS-APPS_20080624, forPHEDEX-datasvc110, WEBTOOLS-APPS_20080619_1, WEBTOOLS-APPS_20080619, WEBTOOLS-APPS_20080617, zx20080611, WEBTOOLS-APPS_20080611, zx20080610, WEBTOOLS-APPS_20080609_1, WEBTOOLS-APPS_20080609, zx20080609, sw_20080509, SiteDB_030608_1, SiteDB_300508_1, SiteDB_280508_1, WEBTOOLS-APPS_20080527_2, WEBTOOLS-APPS_20080527, WEBTOOLS-APPS_20080523, WEBTOOLS-APPS_20080522, WEBTOOLS-APPS_20080521, WEBTOOLS-APPS_20080520, WEBTOOLS-APPS_20080519, zx20080519, WEBTOOLS-APPS_20080511, zx20080509b, zx20080509, pe20080508-testcvs, WEBTOOLS-APPS_20080507_1, WEBTOOLS-APPS_20080507, WEBTOOLS-APPS_20080506, dl080505, WEBTOOLS-APPS_20080501, zx20080430, dl080425_for21x, WEBTOOLS-APPS_20080422, WEBTOOLS-APPS_20080416, zx20080415-comp, webconddb_1_1_1, WEBTOOLS-APPS_20080414, WEBTOOLS-APPS_20080412, WEBTOOLS-APPS_20080411_1, WEBTOOLS-APPS_20080411, WEBTOOLS-APPS_20080410, WEBTOOLS-APPS_20080409_1, WEBTOOLS-APPS_20080409, WEBTOOLS-APPS_20080408_1, WEBTOOLS-APPS_20080408, DBS-APPS_20080407, WEBTOOLS-APPS_20080407, WEBTOOLS-APPS_20080404_2, WEBTOOLS-APPS_20080404_1, WEBTOOLS-APPS_20080404, WEBTOOLS-APPS_20080403_4, WEBTOOLS-APPS_20080403_3, WEBTOOLS-APPS_20080403_2, WEBTOOLS-APPS_20080403_1, WEBTOOLS-APPS_20080403, WEBTOOLS-APPS_20080328, WEBTOOLS-APPS_20080327_1, WEBTOOLS-APPS_20080327, WEBTOOLS-APPS_20080326_6, WEBTOOLS-APPS_20080326_5, WEBTOOLS-APPS_20080326_4, WEBTOOLS-APPS_20080326_3, WEBTOOLS-APPS_20080326_2, WEBTOOLS-APPS_20080326, DBSweb_260308_1, DBSweb_260308, forPHEDEX262_cmsbuild5, forPHEDEX262_cmsbuild4, forPHEDEX262_cmsbuild3, sw_20080319, sw20080319, DBSweb_180308_2, DBSweb_180308_1, DBSweb_180308, DBSweb_170308_8, DBSweb_170308_7, DBSweb_170308_6, DBSweb_170308_5, DBSweb_170308_4, DBSweb_170308_3, DBSweb_170308_2, DBSweb_170308, SiteDB_170308, SiteDB_1_2_1-160308_2, SiteDB_1_2_1-160308, SM_150308_DBSDisc_9, SM_150308_DBSDisc_8, SM_150308_DBSDisc_7, SM_150308_DBSDisc_6, SM_150308_DBSDisc_5, SM_150308_DBSDisc_4, SM_150308_DBSDisc_3, SM_150308_DBSDisc_2, SM_150308_DBSDisc_1, SM_150308_DBSDisc, SiteDB_140308, SiteDB_130308, ge20080304-comp, pe20080229-ports
Branch point for: conddb-branch
Changes since 1.42: +6 -2 lines
Log Message:
Add -m32 patches, etc. for slc5_ia32 in addition to slc4_ia32

File Contents

# User Rev Content
1 elmer 1.42 ### RPM external gcc 4.1.2-CMS19
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 muzaffar 1.26 Source3: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2
18 eulisse 1.18
19 eulisse 1.11 %define cpu %(echo %cmsplatf | cut -d_ -f2)
20 eulisse 1.31 %define gcc_major %(echo %realversion | cut -f1 -d.)
21 eulisse 1.16 %prep
22 dlange 1.17 %setup -T -b 0 -n gcc-%realversion
23 dlange 1.15
24 elmer 1.43 case %cmsos in
25     "slc4_ia32" | "slc5_ia32" )
26 eulisse 1.16 cat << \EOF_CONFIG_GCC >> gcc/config.gcc
27     # CMS patch to include gcc/config/i386/t-cms when building gcc
28     tm_file="$tm_file i386/cms.h"
29     tmake_file="$tmake_file i386/t-cms"
30     EOF_CONFIG_GCC
31    
32     cat << \EOF_CMS_H > gcc/config/i386/cms.h
33 eulisse 1.20 #undef ASM_SPEC
34 eulisse 1.16 #define ASM_SPEC "%%{v:-V} %%{Qy:} %%{!Qn:-Qy} %%{n} %%{T} %%{Ym,*} %%{Yd,*} %%{Wa,*:%%*} --32"
35 eulisse 1.20 #undef CC1_SPEC
36 eulisse 1.16 #define CC1_SPEC "%%(cc1_cpu) %%{profile:-p} -m32"
37 eulisse 1.20 #undef CC1PLUS_SPEC
38 eulisse 1.16 #define CC1PLUS_SPEC "-m32"
39 eulisse 1.20 #undef MULTILIB_DEFAULTS
40 eulisse 1.16 #define MULTILIB_DEFAULTS { "m32" }
41     EOF_CMS_H
42    
43     cat << \EOF_T_CMS > gcc/config/i386/t-cms
44     MULTILIB_OPTIONS = m32
45     MULTILIB_DIRNAMES = ../lib
46     MULTILIB_MATCHES = m32=m32
47     EOF_T_CMS
48 elmer 1.43 ;;
49     esac
50 dlange 1.15
51 eulisse 1.16 %setup -D -T -b 1 -n binutils-%binutilsv
52 eulisse 1.18 %setup -D -T -b 2 -n gmp-%{gmpVersion}
53     %setup -D -T -b 3 -n mpfr-%{mpfrVersion}
54    
55 argiro 1.1 %build
56 eulisse 1.20 # Set special variables required to build 32-bit executables on 64-bit
57     # systems. Note that if the architecture is SLC4/IA32, we may be on a
58     # 64-bit system and need to produce a 32-bit capable compiler, which
59     # _itself_ is a 32-bit executable.
60     case $(uname -m):%{cmsos} in
61     *:slc4_ia32 )
62     CCOPTS="-m32 -Wa,--32" ;;
63 elmer 1.43 *:slc5_ia32 )
64     CCOPTS="-m32 -Wa,--32" ;;
65 eulisse 1.20 * )
66     CCOPTS="" ;;
67     esac
68    
69     # If requested, build our own binutils. Currently the default is to use
70     # the system binutils.
71     %if "%{?use_external_binutils:set}" == "set"
72     cd ../binutils-%{binutilsv}
73     CC="gcc $CCOPTS" ./configure --prefix=%i
74     make %makeprocesses
75     make install
76 eulisse 1.18 %endif
77 eulisse 1.16
78 eulisse 1.20 # Build GMP/MPFR for GCC 4.x
79 eulisse 1.31 %define gcc4opts %{nil}
80     %if "%gcc_major" == "4"
81 eulisse 1.19 cd ../gmp-%{gmpVersion}
82 eulisse 1.20 CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/gmp --disable-shared
83 eulisse 1.19 make %makeprocesses
84 eulisse 1.20 make install
85 eulisse 1.19
86     cd ../mpfr-%{mpfrVersion}
87 eulisse 1.20 CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/mpfr --with-gmp=%i/tmp/gmp --disable-shared
88 eulisse 1.19 make %makeprocesses
89 eulisse 1.31 make install
90     %define gcc4opts --with-gmp=%i/tmp/gmp --with-mpfr=%i/tmp/mpfr
91     %endif
92 eulisse 1.19
93 eulisse 1.20 # Build the compilers
94 elmer 1.21 cd ../gcc-%realversion
95 eulisse 1.18 mkdir -p obj
96     cd obj
97 eulisse 1.20 CC="gcc $CCOPTS" \
98     ../configure --prefix=%i \
99     --enable-languages=c,c++,`case %v in 3.*) echo f77;; *) echo fortran;; esac` \
100 eulisse 1.31 %gcc4opts --enable-shared
101 eulisse 1.18
102     make %makeprocesses bootstrap
103 eulisse 1.16
104 argiro 1.1 %install
105 elmer 1.21 cd %_builddir/gcc-%{realversion}/obj && make install
106 argiro 1.1 ln -s gcc %i/bin/cc
107 eulisse 1.20 find %i/lib %i/lib32 %i/lib64 -name '*.la' -exec rm -f {} \; || true
108    
109 eulisse 1.40 # SCRAM ToolBox toolfile is now geneated by the gcc-toolfile.spec
110     # so that everything works even in the case "--use-system-compiler"
111     # option is specified.
112 muzaffar 1.26
113 eulisse 1.9 %post
114 eulisse 1.20 # %{relocateConfig}lib/libg2c.la
115     # %{relocateConfig}lib/libstdc++.la
116     # %{relocateConfig}lib/libsupc++.la
117     # %if "%cpu" == "amd64"
118     # %{relocateConfig}lib64/libg2c.la
119     # %{relocateConfig}lib64/libstdc++.la
120     # %{relocateConfig}lib64/libsupc++.la
121     # %{relocateConfig}lib/32/libg2c.la
122     # %{relocateConfig}lib/32/libstdc++.la
123     # %{relocateConfig}lib/32/libsupc++.la
124     # %endif
125     # %if "%gcc4" == "true"
126     # %{relocateConfig}lib/libgfortran.la
127     # %{relocateConfig}lib/libgfortranbegin.la
128     # %endif