122 |
|
export PATH=%i/tmp/binutils/bin:$PATH |
123 |
|
export LD_LIBRARY_PATH=%i/tmp/binutils/lib:$PATH |
124 |
|
|
125 |
+ |
# Build gmp/mpfr |
126 |
+ |
%if "%{?gcc4:set}" == "set" |
127 |
+ |
cd ../gmp-%{gmpVersion} |
128 |
+ |
./configure --prefix=%i/tmp/gmp --disable-shared |
129 |
+ |
make %makeprocesses |
130 |
+ |
|
131 |
+ |
cd ../mpfr-%{mpfrVersion} |
132 |
+ |
./configure --prefix=%i/tmp/mpfr --with-gmp=%i/tmp/gmp --disable-shared |
133 |
+ |
make %makeprocesses |
134 |
+ |
%endif |
135 |
+ |
|
136 |
|
# build the native platform compiler |
137 |
|
cd ../gcc-%v |
138 |
|
mkdir -p obj |
139 |
|
cd obj |
140 |
< |
../configure --prefix=%i --enable-languages=c,c++%{firstStepFortran} \ |
140 |
> |
../configure --prefix=%i --enable-languages=c,c++%{fortranCompiler} \ |
141 |
> |
%if "%{gcc4}" == "true" |
142 |
> |
--with-gmp-dir=%_builddir/gmp-%{gmpVersion} \ |
143 |
> |
--with-mpfr-dir=%_builddir/mpfr-%{mpfrVersion} \ |
144 |
> |
%endif |
145 |
|
--enable-shared |
146 |
|
|
147 |
|
make %makeprocesses bootstrap |
157 |
|
make install |
158 |
|
rm -fr %i/tmp |
159 |
|
|
145 |
– |
# And if we are building gcc4, we build gmp and mpfr as well and then rebuild gcc4 with fortran support. |
146 |
– |
%if "%{?gcc4:set}" == "set" |
147 |
– |
cd ../gmp-%{gmpVersion} |
148 |
– |
./configure --prefix=%i |
149 |
– |
make %makeprocesses |
150 |
– |
make install |
151 |
– |
|
152 |
– |
cd ../mpfr-%{mpfrVersion} |
153 |
– |
./configure --prefix=%i --with-gmp=%i |
154 |
– |
make %makeprocesses |
155 |
– |
make install |
156 |
– |
|
157 |
– |
cd ../gcc-%{v}/obj |
158 |
– |
make distclean |
159 |
– |
cd .. |
160 |
– |
|
161 |
– |
buildGCC |
162 |
– |
|
163 |
– |
%endif |
164 |
– |
|
160 |
|
%install |
161 |
|
#cd obj && make install |
162 |
|
ln -s gcc %i/bin/cc |
174 |
|
%endif |
175 |
|
%if "%gcc4" == "true" |
176 |
|
%{relocateConfig}lib/libbfd.la |
182 |
– |
%{relocateConfig}lib/libgmp.la |
177 |
|
%{relocateConfig}lib/libopcodes.la |
184 |
– |
%{relocateConfig}lib/libmudflap.la |
178 |
|
%{relocateConfig}lib/libgfortran.la |
186 |
– |
%{relocateConfig}lib/libmudflapth.la |
187 |
– |
%{relocateConfig}lib/libmpfr.la |
188 |
– |
%{relocateConfig}lib/libssp.la |
179 |
|
%{relocateConfig}lib/libgfortranbegin.la |
180 |
|
%endif |