1 |
< |
### RPM external gcc 3.2.3-wt1 |
1 |
> |
### RPM external gcc 3.4.5-CMS19 |
2 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib/32 |
3 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib64 |
4 |
|
## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) true ;; esac |
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 |
17 |
> |
Source3: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2 |
18 |
|
|
19 |
|
%define cpu %(echo %cmsplatf | cut -d_ -f2) |
20 |
+ |
%define gcc_major %(echo %realversion | cut -f1 -d.) |
21 |
|
%prep |
22 |
|
%setup -T -b 0 -n gcc-%realversion |
23 |
|
|
72 |
|
%endif |
73 |
|
|
74 |
|
# Build GMP/MPFR for GCC 4.x |
75 |
+ |
%define gcc4opts %{nil} |
76 |
+ |
%if "%gcc_major" == "4" |
77 |
|
cd ../gmp-%{gmpVersion} |
78 |
|
CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/gmp --disable-shared |
79 |
|
make %makeprocesses |
82 |
|
cd ../mpfr-%{mpfrVersion} |
83 |
|
CC="gcc $CCOPTS" ./configure --prefix=%i/tmp/mpfr --with-gmp=%i/tmp/gmp --disable-shared |
84 |
|
make %makeprocesses |
85 |
+ |
make install |
86 |
+ |
%define gcc4opts --with-gmp=%i/tmp/gmp --with-mpfr=%i/tmp/mpfr |
87 |
+ |
%endif |
88 |
|
|
89 |
|
# Build the compilers |
90 |
|
cd ../gcc-%realversion |
93 |
|
CC="gcc $CCOPTS" \ |
94 |
|
../configure --prefix=%i \ |
95 |
|
--enable-languages=c,c++,`case %v in 3.*) echo f77;; *) echo fortran;; esac` \ |
96 |
< |
--with-gmp-dir=%_builddir/gmp-%{gmpVersion} \ |
91 |
< |
--with-mpfr-dir=%_builddir/mpfr-%{mpfrVersion} \ |
92 |
< |
--enable-shared |
96 |
> |
%gcc4opts --enable-shared |
97 |
|
|
98 |
|
make %makeprocesses bootstrap |
99 |
|
|
102 |
|
ln -s gcc %i/bin/cc |
103 |
|
find %i/lib %i/lib32 %i/lib64 -name '*.la' -exec rm -f {} \; || true |
104 |
|
|
105 |
+ |
# SCRAM ToolBox toolfile is now geneated by the gcc-toolfile.spec |
106 |
+ |
# so that everything works even in the case "--use-system-compiler" |
107 |
+ |
# option is specified. |
108 |
+ |
|
109 |
|
%post |
110 |
|
# %{relocateConfig}lib/libg2c.la |
111 |
|
# %{relocateConfig}lib/libstdc++.la |