2 # nothing to debug. 3_4-branch is closed.
3 %define _enable_debug_packages 0
5 Summary: GNU Compiler Collection: the C compiler and shared files
6 Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdzielone
11 Group: Development/Languages
12 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
13 # Source0-md5: 4a21ac777d4b5617283ce488b808da7b
14 Patch0: %{name}-info.patch
15 Patch1: %{name}-nolocalefiles.patch
16 Patch2: %{name}-nodebug.patch
17 Patch3: %{name}-pr16276.patch
18 Patch4: %{name}-cxxabi.patch
19 Patch5: %{name}-pr-rh.patch
20 URL: http://gcc.gnu.org/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: binutils >= 2:2.15.91.0.2
25 BuildRequires: fileutils >= 4.0.41
27 BuildRequires: gettext-tools
28 BuildRequires: glibc-devel >= 2.2.5-20
29 BuildRequires: perl-devel
30 BuildRequires: texinfo >= 4.1
31 BuildRequires: zlib-devel
32 Requires: binutils >= 2:2.15.91.0.2
33 Requires: gcc-dirs >= 1.0-3
34 Provides: cpp = %{epoch}:%{version}-%{release}
35 Obsoletes: compat-gcc-34-libgcc
36 Conflicts: glibc-devel < 2.2.5-20
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define rpmcflags -O2 -mtune=ultrasparc
44 A compiler aimed at integrating all the optimizations and features
45 necessary for a high-performance and stable development environment.
47 This package contains the C compiler and some files shared by various
48 parts of the GNU Compiler Collection. In order to use another GCC
49 compiler you will need to install the appropriate subpackage.
51 %description -l pl.UTF-8
52 Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do
53 wyprodukowania szybkiego i stabilnego kodu wynikowego.
55 Ten pakiet zawiera kompilator C i pliki współdzielone przez różne
56 części kolekcji kompilatorów GNU (GCC). Żeby używać innego kompilatora
57 z GCC, trzeba zainstalować odpowiedni podpakiet.
60 Summary: C++ support for gcc
61 Summary(pl.UTF-8): Obsługa C++ dla gcc
62 Group: Development/Languages
63 Obsoletes: compat-gcc-34-libstdc++
64 Obsoletes: compat-gcc-34-libstdc++-devel
65 Obsoletes: compat-gcc-34-libstdc++-static
66 Requires: %{name} = %{epoch}:%{version}-%{release}
69 This package adds C++ support to the GNU Compiler Collection. It
70 includes support for most of the current C++ specification, including
71 templates and exception handling.
73 %description c++ -l pl.UTF-8
74 Ten pakiet dodaje obsługę C++ do kompilatora gcc. Ma wsparcie dla
75 dużej ilości obecnych specyfikacji C++.
78 %setup -q -n gcc-%{version}
86 # because we distribute modified version of gcc...
87 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
88 perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c
90 mv ChangeLog ChangeLog.general
93 # because pr16276 patch modifies configure.ac
97 cp -f /usr/share/automake/config.sub .
99 rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform}
102 CFLAGS="%{rpmcflags}" \
103 CXXFLAGS="%{rpmcflags}" \
106 --prefix=%{_prefix} \
107 --libdir=%{_libdir} \
108 --libexecdir=%{_libdir} \
109 --infodir=%{_infodir} \
110 --mandir=%{_mandir} \
111 --program-suffix="-3.4" \
112 --enable-version-specific-runtime-libs \
114 --enable-threads=posix \
115 --enable-__cxa_atexit \
116 --enable-languages="c,c++" \
120 --disable-libstdcxx-pch \
124 --with-slibdir=/%{_lib} \
127 PATH=$PATH:/sbin:%{_sbindir}
130 %{__make} -C obj-%{_target_platform} \
131 BOOT_CFLAGS="%{rpmcflags}" \
132 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_datadir},%{_infodir}}
140 cd obj-%{_target_platform}
141 PATH=$PATH:/sbin:%{_sbindir}
143 %{__make} -j1 install \
145 infodir=%{_infodir} \
146 DESTDIR=$RPM_BUILD_ROOT
149 ln -f $RPM_BUILD_ROOT%{_bindir}/sparc64-pld-linux-gcc \
150 $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
153 ln -sf gcc-3.4 $RPM_BUILD_ROOT%{_bindir}/cc-3.4
154 echo ".so gcc-3.4.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc-3.4.1
158 # include/ contains install-tools/include/* and headers that were fixed up
159 # by fixincludes, we don't want former
160 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
162 # we have to save these however
163 mv $gccdir/include/syslimits.h $gccdir/tmp
164 mv $gccdir/include/c++ $gccdir/tmp
165 rm -r $gccdir/include
166 mv $gccdir/tmp $gccdir/include
167 cp $gccdir/install-tools/include/*.h $gccdir/include
168 # but we don't want anything more from install-tools
169 rm -r $gccdir/install-tools
172 rm -rf $RPM_BUILD_ROOT
175 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
178 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
181 %defattr(644,root,root,755)
182 %doc ChangeLog.general MAINTAINERS NEWS bugs.html faq.html
183 %doc gcc/{ChangeLog,ONEWS,README.Portability}
184 %dir %{_libdir}/gcc/*/*
185 %dir %{_libdir}/gcc/*/*/include
186 %attr(755,root,root) %{_bindir}/*-gcc*
187 %attr(755,root,root) %{_bindir}/gcc-*
188 %attr(755,root,root) %{_bindir}/gcov-*
189 %attr(755,root,root) %{_bindir}/cc-*
190 %attr(755,root,root) %{_bindir}/cpp-*
191 %{_mandir}/man1/cc-*.1*
192 %{_mandir}/man1/cpp-*.1*
193 %{_mandir}/man1/gcc-*.1*
194 %{_mandir}/man1/gcov-*.1*
195 %{_libdir}/gcc/*/*/libgcov.a
196 %{_libdir}/gcc/*/*/libgcc.a
197 %{_libdir}/gcc/*/*/libgcc_eh.a
198 %{_libdir}/gcc/*/*/specs
199 %{_libdir}/gcc/*/*/crt*.o
200 %attr(755,root,root) %{_libdir}/gcc/*/*/cc1
201 %attr(755,root,root) %{_libdir}/gcc/*/*/collect2
202 %{_libdir}/gcc/*/*/include/*.h
205 %defattr(644,root,root,755)
206 %doc gcc/cp/{ChangeLog,NEWS}
207 %attr(755,root,root) %{_bindir}/g++-*
208 %attr(755,root,root) %{_bindir}/*-g++-*
209 %attr(755,root,root) %{_bindir}/c++-*
210 %attr(755,root,root) %{_bindir}/*-c++-*
211 %attr(755,root,root) %{_libdir}/gcc/*/*/cc1plus
212 %{_libdir}/gcc/*/*/include/c++
213 %{_libdir}/gcc/*/*/libstdc++.a
214 %{_libdir}/gcc/*/*/libstdc++.la
215 %attr(755,root,root) %{_libdir}/gcc/*/*/libstdc++.so*
216 %{_libdir}/gcc/*/*/libsupc++.la
217 %{_libdir}/gcc/*/*/libsupc++.a
218 %{_mandir}/man1/g++-*.1*