]>
Commit | Line | Data |
---|---|---|
dfb16231 MM |
1 | # |
2 | # Conditional build: | |
658584bf | 3 | %bcond_with profiling # build with profiling |
d9101cfa | 4 | %bcond_without bootstrap # omit 3-stage bootstrap |
7c675e43 | 5 | %bcond_with tests # torture gcc |
d9101cfa | 6 | |
90d494b3 | 7 | %if %{without bootstrap} |
0d51b8b7 PS |
8 | %undefine with_profiling |
9 | %endif | |
10 | ||
44aaa0d4 | 11 | Summary: GNU Compiler Collection: the C compiler and shared files |
1f141173 ER |
12 | Summary(es.UTF-8): Colección de compiladores GNU: el compilador C y ficheros compartidos |
13 | Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdzielone | |
14 | Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados | |
90d494b3 AM |
15 | %define sname gcc |
16 | Name: %{sname}4 | |
17 | Version: 4.1.1 | |
90d494b3 | 18 | Release: 1 |
064be8f7 | 19 | Epoch: 5 |
59c005c7 | 20 | License: GPL v2+ |
8774fb0d | 21 | Group: Development/Languages |
90d494b3 AM |
22 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{sname}-%{version}.tar.bz2 |
23 | # Source0-md5: ad9f97a4d04982ccf4fd67cb464879f3 | |
d9101cfa | 24 | Source1: %{name}-optimize-la.pl |
6e0ff186 | 25 | Patch0: %{name}-info.patch |
fa7ab34d | 26 | Patch1: %{name}-nolocalefiles.patch |
d9101cfa | 27 | Patch2: %{name}-nodebug.patch |
700c2625 MP |
28 | Patch3: %{name}-ada-link.patch |
29 | Patch4: %{name}-sparc64-ada_fix.patch | |
d9101cfa | 30 | Patch5: %{name}-alpha-ada_fix.patch |
90d494b3 AM |
31 | # -fvisibility fixes... |
32 | Patch6: %{name}-pr19664_gnu_internal.patch | |
33 | Patch7: %{name}-pr19664_libstdc++.patch | |
34 | Patch8: %{name}-pr20218.patch | |
35 | ||
36 | # PRs | |
37 | Patch10: %{name}-pr7776.patch | |
38 | Patch11: %{name}-pr19606.patch | |
39 | Patch12: %{name}-pr24879.patch | |
40 | Patch13: %{name}-pr26435-pr20256.patch | |
41 | ||
42 | Patch17: %{name}-pr19505.patch | |
43 | Patch18: %{name}-pr24419.patch | |
44 | Patch19: %{name}-pr24669.patch | |
45 | Patch20: %{name}-pr17390.patch | |
46 | Patch21: %{name}-pr13676.patch | |
47 | Patch22: %{name}-pr25626.patch | |
48 | Patch23: %{name}-libstdcxx-bitset.patch | |
49 | ||
50 | Patch25: %{name}-libjava-multilib.patch | |
51 | Patch26: %{name}-ppc64-m32-m64-multilib-only.patch | |
52 | Patch27: %{name}-enable-java-awt-qt.patch | |
53 | ||
54 | # 128-bit long double support for glibc 2.4 | |
55 | Patch30: %{name}-ldbl-default-libstdc++.patch | |
56 | Patch31: %{name}-ldbl-default.patch | |
57 | ||
fa7ab34d | 58 | URL: http://gcc.gnu.org/ |
f32f2f0d | 59 | BuildRequires: autoconf |
7c675e43 | 60 | %{?with_tests:BuildRequires: autogen} |
b3f5aea2 | 61 | BuildRequires: automake |
700c2625 MP |
62 | # binutils 2.16.91 or newer are required for compiling medium model now |
63 | BuildRequires: binutils >= 2:2.16.91.0.1 | |
df0fb473 | 64 | BuildRequires: bison |
6aca12cf | 65 | BuildRequires: chrpath >= 0.10 |
7c675e43 | 66 | %{?with_tests:BuildRequires: dejagnu} |
dfb16231 | 67 | BuildRequires: fileutils >= 4.0.41 |
fa7ab34d | 68 | BuildRequires: flex |
6455683d | 69 | BuildRequires: gettext-devel |
6aca12cf | 70 | BuildRequires: glibc-devel >= 6:2.3 |
1d23d810 | 71 | BuildRequires: perl-base |
e9b273c0 | 72 | BuildRequires: rpmbuild(macros) >= 1.211 |
f32f2f0d JB |
73 | BuildRequires: texinfo >= 4.1 |
74 | BuildRequires: zlib-devel | |
d9101cfa PS |
75 | # AS_NEEDED directive for dynamic linker |
76 | # http://sources.redhat.com/ml/glibc-cvs/2005-q1/msg00614.html | |
77 | # http://sources.redhat.com/ml/binutils/2005-01/msg00288.html | |
78 | Requires: binutils >= 2:2.16.90.0.1-0.3 | |
6aca12cf AM |
79 | Requires: libgcc4 = %{epoch}:%{version}-%{release} |
80 | Provides: cpp4 = %{epoch}:%{version}-%{release} | |
90d494b3 | 81 | BuildRoot: %{tmpdir}/%{sname}-%{version}-root-%(id -u -n) |
5daa5407 | 82 | |
81c90c73 | 83 | %define _slibdir /%{_lib} |
6bb6b7cc | 84 | |
5daa5407 | 85 | %description |
8774fb0d JR |
86 | A compiler aimed at integrating all the optimizations and features |
87 | necessary for a high-performance and stable development environment. | |
5daa5407 | 88 | |
44aaa0d4 | 89 | This package contains the C compiler and some files shared by various |
90 | parts of the GNU Compiler Collection. In order to use another GCC | |
91 | compiler you will need to install the appropriate subpackage. | |
92 | ||
d3e46e1f | 93 | %description -l es.UTF-8 |
064be8f7 | 94 | Un compilador que intenta integrar todas las optimalizaciones y |
d3e46e1f | 95 | características necesarias para un entorno de desarrollo eficaz y |
064be8f7 JB |
96 | estable. |
97 | ||
98 | Este paquete contiene el compilador de C y unos ficheros compartidos | |
d3e46e1f JR |
99 | por varias partes de la colección de compiladores GNU (GCC). Para usar |
100 | otro compilador de GCC será necesario que instale el subpaquete | |
064be8f7 JB |
101 | adecuado. |
102 | ||
d3e46e1f JR |
103 | %description -l pl.UTF-8 |
104 | Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do | |
e41aa012 | 105 | wyprodukowania szybkiego i stabilnego kodu wynikowego. |
dfb16231 | 106 | |
d3e46e1f JR |
107 | Ten pakiet zawiera kompilator C i pliki współdzielone przez różne |
108 | części kolekcji kompilatorów GNU (GCC). Żeby używać innego kompilatora | |
109 | z GCC, trzeba zainstalować odpowiedni podpakiet. | |
44aaa0d4 | 110 | |
d3e46e1f JR |
111 | %description -l pt_BR.UTF-8 |
112 | Este pacote adiciona infraestrutura básica e suporte a linguagem C ao | |
064be8f7 JB |
113 | GNU Compiler Collection. |
114 | ||
90d494b3 | 115 | %package -n libgcc4 |
dfb16231 | 116 | Summary: Shared gcc library |
1f141173 ER |
117 | Summary(es.UTF-8): Biblioteca compartida de gcc |
118 | Summary(pl.UTF-8): Biblioteka gcc | |
119 | Summary(pt_BR.UTF-8): Biblioteca runtime para o GCC | |
59c005c7 | 120 | License: GPL with unlimited link permission |
dfb16231 | 121 | Group: Libraries |
dfb16231 | 122 | |
90d494b3 | 123 | %description -n libgcc4 |
dfb16231 MM |
124 | Shared gcc library. |
125 | ||
d3e46e1f | 126 | %description -n libgcc4 -l es.UTF-8 |
064be8f7 JB |
127 | Biblioteca compartida de gcc. |
128 | ||
d3e46e1f | 129 | %description -n libgcc4 -l pl.UTF-8 |
dfb16231 | 130 | Biblioteka dynamiczna gcc. |
8774fb0d | 131 | |
d3e46e1f | 132 | %description -n libgcc4 -l pt_BR.UTF-8 |
064be8f7 JB |
133 | Biblioteca runtime para o GCC. |
134 | ||
5daa5407 | 135 | %prep |
90d494b3 AM |
136 | %setup -q -n gcc-%{version} |
137 | ||
6e0ff186 | 138 | %patch0 -p1 |
8774fb0d | 139 | %patch1 -p1 |
85e162d0 | 140 | %patch2 -p1 |
d9101cfa PS |
141 | %patch3 -p1 |
142 | %patch4 -p1 | |
d44a03c0 | 143 | %patch5 -p1 |
90d494b3 AM |
144 | |
145 | # -fvisbility fixes... | |
fb247b50 | 146 | %patch6 -p1 |
c92119d5 | 147 | %patch7 -p1 |
700c2625 | 148 | %patch8 -p1 |
90d494b3 AM |
149 | |
150 | # PRs | |
151 | %patch10 -p1 | |
152 | %patch11 -p0 | |
e88958d4 | 153 | %patch12 -p0 |
8f396a9b | 154 | %patch13 -p1 |
90d494b3 AM |
155 | |
156 | %patch17 -p1 | |
157 | %patch18 -p1 | |
158 | %patch19 -p1 | |
159 | %patch20 -p1 | |
160 | %patch21 -p1 | |
161 | %patch22 -p1 | |
162 | %patch23 -p1 | |
163 | ||
164 | %patch25 -p1 | |
165 | %patch26 -p1 | |
166 | %patch27 -p1 | |
167 | ||
168 | %patch30 -p0 | |
169 | %patch31 -p0 | |
4ca509a2 | 170 | |
ff5ba46f | 171 | # because we distribute modified version of gcc... |
700c2625 | 172 | sed -i 's:#define VERSUFFIX.*:#define VERSUFFIX " (PLD-Linux)":' gcc/version.c |
80bd8096 | 173 | perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c |
55d24315 | 174 | |
fa7ab34d PS |
175 | mv ChangeLog ChangeLog.general |
176 | ||
5daa5407 | 177 | %build |
fa7ab34d PS |
178 | cd gcc |
179 | %{__autoconf} | |
180 | cd .. | |
700c2625 MP |
181 | cd libjava |
182 | %{__autoconf} | |
183 | cd classpath | |
e7ee880c PS |
184 | %{__autoconf} |
185 | cd ../.. | |
fa7ab34d | 186 | cp -f /usr/share/automake/config.sub . |
0a189d1d | 187 | |
700c2625 | 188 | rm -rf builddir && install -d builddir && cd builddir |
af50fe63 | 189 | |
f1f6fd72 | 190 | CFLAGS="%{rpmcflags}" \ |
ca3fedb4 | 191 | CXXFLAGS="%{rpmcxxflags}" \ |
26fa47ad JB |
192 | TEXCONFIG=false \ |
193 | ../configure \ | |
6aca12cf | 194 | --program-suffix="4" \ |
8774fb0d | 195 | --prefix=%{_prefix} \ |
700c2625 | 196 | --with-local-prefix=%{_prefix}/local \ |
81c90c73 | 197 | --libdir=%{_libdir} \ |
064be8f7 | 198 | --libexecdir=%{_libdir} \ |
8774fb0d | 199 | --infodir=%{_infodir} \ |
dfb16231 | 200 | --mandir=%{_mandir} \ |
700c2625 | 201 | --x-libraries=%{_libdir} \ |
8774fb0d | 202 | --enable-shared \ |
7b611fce | 203 | --enable-threads=posix \ |
90d494b3 | 204 | --enable-languages="c" \ |
dfb16231 MM |
205 | --enable-c99 \ |
206 | --enable-long-long \ | |
dfb16231 | 207 | --enable-nls \ |
78526645 | 208 | --disable-werror \ |
8774fb0d JR |
209 | --with-gnu-as \ |
210 | --with-gnu-ld \ | |
d9101cfa | 211 | --with-demangler-in-ld \ |
dfb16231 MM |
212 | --with-system-zlib \ |
213 | --with-slibdir=%{_slibdir} \ | |
700c2625 MP |
214 | %ifnarch ia64 |
215 | --without-system-libunwind \ | |
216 | %else | |
217 | --with-system-libunwind \ | |
218 | %endif | |
90d494b3 | 219 | --without-x \ |
700c2625 MP |
220 | --with-long-double-128 \ |
221 | %ifarch ppc ppc64 | |
222 | --enable-secureplt \ | |
223 | %endif | |
4bea6077 | 224 | --disable-multilib \ |
dfb16231 | 225 | %{_target_platform} |
8774fb0d | 226 | |
4037f15f | 227 | cd .. |
d9101cfa | 228 | |
700c2625 | 229 | %{__make} -C builddir \ |
90d494b3 | 230 | %{?with_bootstrap:%{?with_profiling:profiled}bootstrap} \ |
ce3b9485 | 231 | GCJFLAGS="%{rpmcflags}" \ |
fa7ab34d | 232 | BOOT_CFLAGS="%{rpmcflags}" \ |
90d494b3 | 233 | STAGE1_CFLAGS="%{rpmcflags} -O0" \ |
85e162d0 | 234 | GNATLIBCFLAGS="%{rpmcflags}" \ |
dfb16231 MM |
235 | LDFLAGS_FOR_TARGET="%{rpmldflags}" \ |
236 | mandir=%{_mandir} \ | |
237 | infodir=%{_infodir} | |
dfb16231 | 238 | |
700c2625 | 239 | %{?with_tests:%{__make} -k -C builddir check 2>&1 ||:} |
7c675e43 | 240 | |
5daa5407 | 241 | %install |
242 | rm -rf $RPM_BUILD_ROOT | |
fa7ab34d | 243 | install -d $RPM_BUILD_ROOT{/lib,%{_aclocaldir},%{_datadir},%{_infodir}} |
8774fb0d | 244 | |
700c2625 | 245 | cd builddir |
8774fb0d | 246 | |
fa7ab34d | 247 | %{__make} -j1 install \ |
0a189d1d JK |
248 | mandir=%{_mandir} \ |
249 | infodir=%{_infodir} \ | |
06d2b6be | 250 | DESTDIR=$RPM_BUILD_ROOT |
8774fb0d | 251 | |
d9101cfa PS |
252 | install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version} |
253 | ||
397739ba | 254 | %ifarch sparc64 |
6aca12cf AM |
255 | ln -sf %{_bindir}/sparc64-pld-linux-gcc4 \ |
256 | $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc4 | |
397739ba | 257 | %endif |
258 | ||
6aca12cf AM |
259 | ln -sf %{_bindir}/cpp4 $RPM_BUILD_ROOT/lib/cpp4 |
260 | ln -sf gcc4 $RPM_BUILD_ROOT%{_bindir}/cc4 | |
261 | echo ".so gcc4.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc4.1 | |
8774fb0d | 262 | |
6d54da48 | 263 | libssp=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libssp.so.*.*.*) |
9abb5329 | 264 | mv $RPM_BUILD_ROOT{%{_libdir}/$libssp,%{_slibdir}} |
6d54da48 | 265 | ln -sf %{_slibdir}/$libssp $RPM_BUILD_ROOT%{_libdir}/libssp.so |
dfb16231 | 266 | |
dfb16231 MM |
267 | cd .. |
268 | ||
d061c086 MM |
269 | # include/ contains install-tools/include/* and headers that were fixed up |
270 | # by fixincludes, we don't want former | |
fa7ab34d | 271 | gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/) |
d9101cfa | 272 | mkdir $gccdir/tmp |
90d494b3 | 273 | |
d061c086 | 274 | # we have to save these however |
1651e3ac | 275 | mv $gccdir/include/syslimits.h $gccdir/tmp |
700c2625 | 276 | mv $gccdir/include/ssp $gccdir/tmp |
1651e3ac PS |
277 | rm -rf $gccdir/include |
278 | mv $gccdir/tmp $gccdir/include | |
279 | cp $gccdir/install-tools/include/*.h $gccdir/include | |
d061c086 | 280 | # but we don't want anything more from install-tools |
1651e3ac | 281 | rm -rf $gccdir/install-tools |
d061c086 | 282 | |
d9101cfa | 283 | %find_lang gcc |
700c2625 MP |
284 | %find_lang cpplib |
285 | cat cpplib.lang >> gcc.lang | |
286 | ||
785e13a1 PS |
287 | # cvs snap doesn't contain (release does) below files, |
288 | # so let's create dummy entries to satisfy %%files. | |
aa1ae52d | 289 | [ ! -f NEWS ] && touch NEWS |
57fabf8e PS |
290 | [ ! -f libgfortran/AUTHORS ] && touch libgfortran/AUTHORS |
291 | [ ! -f libgfortran/README ] && touch libgfortran/README | |
aa1ae52d | 292 | |
a7c4dcef JB |
293 | %clean |
294 | rm -rf $RPM_BUILD_ROOT | |
295 | ||
8774fb0d | 296 | %post |
6fff0958 | 297 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
8774fb0d | 298 | |
b162ba42 | 299 | %postun |
6fff0958 | 300 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
8774fb0d | 301 | |
90d494b3 AM |
302 | %post -p /sbin/ldconfig -n libgcc4 |
303 | %postun -p /sbin/ldconfig -n libgcc4 | |
dfb16231 | 304 | |
6aca12cf | 305 | %files |
c8246a7d | 306 | %defattr(644,root,root,755) |
0d51b8b7 PS |
307 | %doc ChangeLog.general MAINTAINERS NEWS |
308 | # bugs.html faq.html | |
fa7ab34d | 309 | %doc gcc/{ChangeLog,ONEWS,README.Portability} |
d9101cfa PS |
310 | %dir %{_libdir}/gcc |
311 | %dir %{_libdir}/gcc/* | |
fa7ab34d | 312 | %dir %{_libdir}/gcc/*/* |
90d494b3 AM |
313 | %dir %{_libdir}/gcc/*/*/include |
314 | %dir %{_libdir}/gcc/*/*/include/ssp | |
315 | ||
0a189d1d | 316 | %attr(755,root,root) %{_bindir}/*-gcc* |
6aca12cf AM |
317 | %attr(755,root,root) %{_bindir}/gcc4 |
318 | %attr(755,root,root) %{_bindir}/gccbug4 | |
319 | %attr(755,root,root) %{_bindir}/gcov4 | |
320 | %attr(755,root,root) %{_bindir}/cc4 | |
321 | %attr(755,root,root) %{_bindir}/cpp4 | |
322 | ||
323 | %{_mandir}/man1/cc4.1* | |
324 | %{_mandir}/man1/cpp4.1* | |
325 | %{_mandir}/man1/gcc4.1* | |
326 | %{_mandir}/man1/gcov4.1* | |
327 | ||
328 | %attr(755,root,root) /lib/cpp4 | |
90d494b3 | 329 | |
26fa47ad | 330 | %attr(755,root,root) %{_slibdir}/lib*.so |
700c2625 | 331 | %{_libdir}/libssp.a |
1f5d3f74 | 332 | %{_libdir}/libssp.la |
6d54da48 | 333 | %attr(755,root,root) %{_libdir}/libssp.so |
a1128c9b PS |
334 | %{_libdir}/libssp_nonshared.a |
335 | %{_libdir}/libssp_nonshared.la | |
fa7ab34d PS |
336 | %{_libdir}/gcc/*/*/libgcov.a |
337 | %{_libdir}/gcc/*/*/libgcc.a | |
338 | %{_libdir}/gcc/*/*/libgcc_eh.a | |
339 | %{_libdir}/gcc/*/*/specs | |
d9101cfa | 340 | %{_libdir}/gcc/*/*/crt*.o |
fa7ab34d PS |
341 | %attr(755,root,root) %{_libdir}/gcc/*/*/cc1 |
342 | %attr(755,root,root) %{_libdir}/gcc/*/*/collect2 | |
90d494b3 AM |
343 | |
344 | %{_libdir}/gcc/*/*/include/*.h | |
700c2625 | 345 | %{_libdir}/gcc/*/*/include/ssp/*.h |
4f1f0ee7 | 346 | |
90d494b3 | 347 | %files -n libgcc4 |
8774fb0d | 348 | %defattr(644,root,root,755) |
d9101cfa | 349 | %attr(755,root,root) %{_slibdir}/lib*.so.* |