1 |
|
### RPM external gcc 4.6.0 |
2 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib/32 |
3 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib64 |
4 |
< |
%define realversion 4.6-20110226 |
4 |
> |
%define realversion 4.6-20110429 |
5 |
|
#Source0: ftp://ftp.fu-berlin.de/unix/gnu/%n/%n-%realversion/%n-%realversion.tar.bz2 |
6 |
< |
Source0: ftp://ftp.nluug.nl/mirror/languages/gcc/snapshots/%realversion/gcc-%realversion.tar.bz2 |
7 |
< |
# If gcc version >= 4.0.0, we need two additional sources, for gmp and mpfr. |
6 |
> |
Source0: http://gcc.cybermirror.org/snapshots/%realversion/%n-%realversion.tar.bz2 |
7 |
> |
# For gcc version >= 4.0.0, a number of additional sources are needed. |
8 |
|
%define gmpVersion 4.3.2 |
9 |
|
%define mpfrVersion 2.4.2 |
10 |
|
%define mpcVersion 0.8.1 |
25 |
|
%define use_custom_binutils %(echo %cmsos | sed -e 's|slc[0-9]*_amd64|true|') |
26 |
|
%if "%use_custom_binutils" == "true" |
27 |
|
%define bisonVersion 2.4 |
28 |
– |
%define binutilsv 2.20.1 |
28 |
|
Source6: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.bz2 |
29 |
< |
Source7: http://ftp.gnu.org/gnu/binutils/binutils-%binutilsv.tar.bz2 |
29 |
> |
%define binutilsv 2.21.51.0.8 |
30 |
> |
#Source7: http://ftp.gnu.org/gnu/binutils/binutils-%binutilsv.tar.bz2 |
31 |
> |
Source7: http://www.kernel.org/pub/linux/devel/binutils/binutils-%binutilsv.tar.bz2 |
32 |
|
%endif |
33 |
|
|
34 |
|
# gcc 4.5+ link time optimization support requires libelf to work. However |
134 |
|
# Whenever we build custom binutils we also enable the new linker "gold". |
135 |
|
# We do so only if we are using the new gcc 4.5+ |
136 |
|
if [ "X%use_custom_binutils:%gcc_45plus" = Xtrue:true ] ; then |
137 |
< |
CONF_BINUTILS_OPTS="--enable-gold" |
137 |
> |
CONF_BINUTILS_OPTS="--enable-gold --enable-lto --enable-plugins --enable-threads" |
138 |
|
fi |
139 |
|
|
140 |
|
USER_CXX=$CCOPTS |
160 |
|
make install |
161 |
|
export PATH=%i/tmp/bison/bin:$PATH |
162 |
|
cd ../binutils-%{binutilsv} |
163 |
+ |
# Try to avoid dependency on makeinfo. |
164 |
+ |
perl -p -i -e 's|SUBDIRS = .*|SUBDIRS =|' bfd/Makefile.in binutils/Makefile.in |
165 |
+ |
perl -p -i -e 's|all: info|all:|' etc/Makefile.in |
166 |
+ |
|
167 |
|
./configure --prefix=%i ${CONF_BINUTILS_OPTS} \ |
168 |
|
CC="gcc $CCOPTS" CFLAGS="-I%i/include" \ |
169 |
|
CXXFLAGS="-I%i/include" LDFLAGS="-L%i/lib" |
211 |
|
cd obj |
212 |
|
export LD_LIBRARY_PATH=%i/lib64:%i/lib:$LD_LIBRARY_PATH |
213 |
|
../configure --prefix=%i \ |
214 |
+ |
--enable-gold=yes --enable-lto --with-build-config=bootstrap-lto \ |
215 |
|
--enable-languages=c,c++,fortran \ |
216 |
|
$CONF_GCC_VERSION_OPTS --enable-shared CC="gcc $CCOPTS" CXX="c++ $USER_CXX" |
217 |
|
|