3 %bcond_with profiling # build with profiling
4 %bcond_without bootstrap # omit 3-stage bootstrap
5 %bcond_with tests # torture gcc
7 %if %{without bootstrap}
8 %undefine with_profiling
11 Summary: GNU Compiler Collection: the C compiler and shared files
12 Summary(es): Colección de compiladores GNU: el compilador C y ficheros compartidos
13 Summary(pl): Kolekcja kompilatorów GNU: kompilator C i pliki wspó³dzielone
14 Summary(pt_BR): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
18 #define _snap 20060515r113785
19 #define _snap 20060517
20 #Release: 0.%{_snap}.1
24 Group: Development/Languages
25 #Source0: ftp://gcc.gnu.org/pub/gcc/prerelease-%{version}-%{_snap}/gcc-%{version}-%{_snap}.tar.bz2
26 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{sname}-%{version}.tar.bz2
27 # Source0-md5: ad9f97a4d04982ccf4fd67cb464879f3
28 #Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-%{_snap}/gcc-4.1-%{_snap}.tar.bz2
29 #Source0: gcc-4.1-%{_snap}.tar.bz2
30 Source1: %{name}-optimize-la.pl
31 Patch0: %{name}-info.patch
32 Patch1: %{name}-nolocalefiles.patch
33 Patch2: %{name}-nodebug.patch
34 Patch3: %{name}-ada-link.patch
35 Patch4: %{name}-sparc64-ada_fix.patch
36 Patch5: %{name}-alpha-ada_fix.patch
37 # -fvisibility fixes...
38 Patch6: %{name}-pr19664_gnu_internal.patch
39 Patch7: %{name}-pr19664_libstdc++.patch
40 Patch8: %{name}-pr20218.patch
43 Patch10: %{name}-pr7776.patch
44 Patch11: %{name}-pr19606.patch
45 Patch12: %{name}-pr24879.patch
46 Patch13: %{name}-pr26435-pr20256.patch
48 Patch17: %{name}-pr19505.patch
49 Patch18: %{name}-pr24419.patch
50 Patch19: %{name}-pr24669.patch
51 Patch20: %{name}-pr17390.patch
52 Patch21: %{name}-pr13676.patch
53 Patch22: %{name}-pr25626.patch
54 Patch23: %{name}-libstdcxx-bitset.patch
56 Patch25: %{name}-libjava-multilib.patch
57 Patch26: %{name}-ppc64-m32-m64-multilib-only.patch
58 Patch27: %{name}-enable-java-awt-qt.patch
60 # 128-bit long double support for glibc 2.4
61 Patch30: %{name}-ldbl-default-libstdc++.patch
62 Patch31: %{name}-ldbl-default.patch
64 URL: http://gcc.gnu.org/
65 BuildRequires: autoconf
66 %{?with_tests:BuildRequires: autogen}
67 BuildRequires: automake
68 # binutils 2.16.91 or newer are required for compiling medium model now
69 BuildRequires: binutils >= 2:2.16.91.0.1
71 BuildRequires: chrpath >= 0.13-2
72 %{?with_tests:BuildRequires: dejagnu}
73 BuildRequires: fileutils >= 4.0.41
75 BuildRequires: gettext-devel
76 BuildRequires: glibc-devel >= 6:2.4-1
77 BuildRequires: perl-base
78 BuildRequires: rpmbuild(macros) >= 1.211
79 BuildRequires: texinfo >= 4.1
80 BuildRequires: zlib-devel
81 # AS_NEEDED directive for dynamic linker
82 # http://sources.redhat.com/ml/glibc-cvs/2005-q1/msg00614.html
83 # http://sources.redhat.com/ml/binutils/2005-01/msg00288.html
84 Requires: binutils >= 2:2.16.90.0.1-0.3
85 Requires: libgcc = %{epoch}:%{version}-%{release}
86 Provides: cpp = %{epoch}:%{version}-%{release}
93 Conflicts: glibc-devel < 2.2.5-20
94 BuildRoot: %{tmpdir}/%{sname}-%{version}-root-%(id -u -n)
96 %define _slibdir /%{_lib}
99 A compiler aimed at integrating all the optimizations and features
100 necessary for a high-performance and stable development environment.
102 This package contains the C compiler and some files shared by various
103 parts of the GNU Compiler Collection. In order to use another GCC
104 compiler you will need to install the appropriate subpackage.
107 Un compilador que intenta integrar todas las optimalizaciones y
108 características necesarias para un entorno de desarrollo eficaz y
111 Este paquete contiene el compilador de C y unos ficheros compartidos
112 por varias partes de la colección de compiladores GNU (GCC). Para usar
113 otro compilador de GCC será necesario que instale el subpaquete
117 Kompilator, posiadaj±cy du¿e mo¿liwo¶ci optymalizacyjne niezbêdne do
118 wyprodukowania szybkiego i stabilnego kodu wynikowego.
120 Ten pakiet zawiera kompilator C i pliki wspó³dzielone przez ró¿ne
121 czê¶ci kolekcji kompilatorów GNU (GCC). ¯eby u¿ywaæ innego kompilatora
122 z GCC, trzeba zainstalowaæ odpowiedni podpakiet.
124 %description -l pt_BR
125 Este pacote adiciona infraestrutura básica e suporte a linguagem C ao
126 GNU Compiler Collection.
129 Summary: Shared gcc library
130 Summary(es): Biblioteca compartida de gcc
131 Summary(pl): Biblioteka gcc
132 Summary(pt_BR): Biblioteca runtime para o GCC
133 License: GPL with unlimited link permission
137 %description -n libgcc4
140 %description -n libgcc4 -l es
141 Biblioteca compartida de gcc.
143 %description -n libgcc4 -l pl
144 Biblioteka dynamiczna gcc.
146 %description -n libgcc4 -l pt_BR
147 Biblioteca runtime para o GCC.
150 %setup -q -n gcc-%{version}
159 # -fvisbility fixes...
185 # because we distribute modified version of gcc...
186 sed -i 's:#define VERSUFFIX.*:#define VERSUFFIX " (PLD-Linux)":' gcc/version.c
187 perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c
189 mv ChangeLog ChangeLog.general
200 cp -f /usr/share/automake/config.sub .
202 rm -rf builddir && install -d builddir && cd builddir
204 CFLAGS="%{rpmcflags}" \
205 CXXFLAGS="%{rpmcxxflags}" \
208 --prefix=%{_prefix} \
209 --with-local-prefix=%{_prefix}/local \
210 --libdir=%{_libdir} \
211 --libexecdir=%{_libdir} \
212 --infodir=%{_infodir} \
213 --mandir=%{_mandir} \
214 --x-libraries=%{_libdir} \
216 --enable-threads=posix \
217 --enable-languages="c" \
224 --with-demangler-in-ld \
226 --with-slibdir=%{_slibdir} \
228 --without-system-libunwind \
230 --with-system-libunwind \
233 --with-long-double-128 \
241 %{__make} -C builddir \
242 %{?with_bootstrap:%{?with_profiling:profiled}bootstrap} \
243 GCJFLAGS="%{rpmcflags}" \
244 BOOT_CFLAGS="%{rpmcflags}" \
245 STAGE1_CFLAGS="%{rpmcflags} -O0" \
246 GNATLIBCFLAGS="%{rpmcflags}" \
247 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
251 %{?with_tests:%{__make} -k -C builddir check 2>&1 ||:}
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{/lib,%{_aclocaldir},%{_datadir},%{_infodir}}
259 %{__make} -j1 install \
261 infodir=%{_infodir} \
262 DESTDIR=$RPM_BUILD_ROOT
264 install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version}
267 ln -sf %{_bindir}/sparc64-pld-linux-gcc \
268 $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
271 ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp
272 ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
273 echo ".so gcc.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
275 libssp=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libssp.so.*.*.*)
276 mv $RPM_BUILD_ROOT{%{_libdir}/$libssp,%{_slibdir}}
277 ln -sf %{_slibdir}/$libssp $RPM_BUILD_ROOT%{_libdir}/libssp.so
281 # include/ contains install-tools/include/* and headers that were fixed up
282 # by fixincludes, we don't want former
283 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
286 # we have to save these however
287 mv $gccdir/include/syslimits.h $gccdir/tmp
288 mv $gccdir/include/ssp $gccdir/tmp
289 rm -rf $gccdir/include
290 mv $gccdir/tmp $gccdir/include
291 cp $gccdir/install-tools/include/*.h $gccdir/include
292 # but we don't want anything more from install-tools
293 rm -rf $gccdir/install-tools
297 cat cpplib.lang >> gcc.lang
299 # cvs snap doesn't contain (release does) below files,
300 # so let's create dummy entries to satisfy %%files.
301 [ ! -f NEWS ] && touch NEWS
302 [ ! -f libgfortran/AUTHORS ] && touch libgfortran/AUTHORS
303 [ ! -f libgfortran/README ] && touch libgfortran/README
306 rm -rf $RPM_BUILD_ROOT
309 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
312 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
314 %post -p /sbin/ldconfig -n libgcc4
315 %postun -p /sbin/ldconfig -n libgcc4
318 %defattr(644,root,root,755)
319 %doc ChangeLog.general MAINTAINERS NEWS
321 %doc gcc/{ChangeLog,ONEWS,README.Portability}
323 %dir %{_libdir}/gcc/*
324 %dir %{_libdir}/gcc/*/*
325 %dir %{_libdir}/gcc/*/*/include
326 %dir %{_libdir}/gcc/*/*/include/ssp
328 %attr(755,root,root) %{_bindir}/*-gcc*
329 %attr(755,root,root) %{_bindir}/gcc
330 %attr(755,root,root) %{_bindir}/gccbug
331 %attr(755,root,root) %{_bindir}/gcov
332 %attr(755,root,root) %{_bindir}/cc
333 %attr(755,root,root) %{_bindir}/cpp
335 %{_mandir}/man1/cc.1*
336 %{_mandir}/man1/cpp.1*
337 %{_mandir}/man1/gcc.1*
338 %{_mandir}/man1/gcov.1*
343 %attr(755,root,root) /lib/cpp
345 %attr(755,root,root) %{_slibdir}/lib*.so
348 %attr(755,root,root) %{_libdir}/libssp.so
349 %{_libdir}/libssp_nonshared.a
350 %{_libdir}/libssp_nonshared.la
351 %{_libdir}/gcc/*/*/libgcov.a
352 %{_libdir}/gcc/*/*/libgcc.a
353 %{_libdir}/gcc/*/*/libgcc_eh.a
354 %{_libdir}/gcc/*/*/specs
355 %{_libdir}/gcc/*/*/crt*.o
356 %attr(755,root,root) %{_libdir}/gcc/*/*/cc1
357 %attr(755,root,root) %{_libdir}/gcc/*/*/collect2
359 %{_libdir}/gcc/*/*/include/*.h
360 %{_libdir}/gcc/*/*/include/ssp/*.h
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_slibdir}/lib*.so.*