]> git.pld-linux.org Git - packages/gcc4.git/blame - gcc4.spec
- tabs in preamble
[packages/gcc4.git] / gcc4.spec
CommitLineData
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 11Summary: GNU Compiler Collection: the C compiler and shared files
1f141173
ER
12Summary(es.UTF-8): Colección de compiladores GNU: el compilador C y ficheros compartidos
13Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdzielone
14Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
90d494b3
AM
15%define sname gcc
16Name: %{sname}4
17Version: 4.1.1
90d494b3 18Release: 1
064be8f7 19Epoch: 5
59c005c7 20License: GPL v2+
8774fb0d 21Group: Development/Languages
90d494b3
AM
22Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{sname}-%{version}.tar.bz2
23# Source0-md5: ad9f97a4d04982ccf4fd67cb464879f3
d9101cfa 24Source1: %{name}-optimize-la.pl
6e0ff186 25Patch0: %{name}-info.patch
fa7ab34d 26Patch1: %{name}-nolocalefiles.patch
d9101cfa 27Patch2: %{name}-nodebug.patch
700c2625
MP
28Patch3: %{name}-ada-link.patch
29Patch4: %{name}-sparc64-ada_fix.patch
d9101cfa 30Patch5: %{name}-alpha-ada_fix.patch
90d494b3
AM
31# -fvisibility fixes...
32Patch6: %{name}-pr19664_gnu_internal.patch
33Patch7: %{name}-pr19664_libstdc++.patch
34Patch8: %{name}-pr20218.patch
35
36# PRs
37Patch10: %{name}-pr7776.patch
38Patch11: %{name}-pr19606.patch
39Patch12: %{name}-pr24879.patch
40Patch13: %{name}-pr26435-pr20256.patch
41
42Patch17: %{name}-pr19505.patch
43Patch18: %{name}-pr24419.patch
44Patch19: %{name}-pr24669.patch
45Patch20: %{name}-pr17390.patch
46Patch21: %{name}-pr13676.patch
47Patch22: %{name}-pr25626.patch
48Patch23: %{name}-libstdcxx-bitset.patch
49
50Patch25: %{name}-libjava-multilib.patch
51Patch26: %{name}-ppc64-m32-m64-multilib-only.patch
52Patch27: %{name}-enable-java-awt-qt.patch
53
54# 128-bit long double support for glibc 2.4
55Patch30: %{name}-ldbl-default-libstdc++.patch
56Patch31: %{name}-ldbl-default.patch
57
fa7ab34d 58URL: http://gcc.gnu.org/
f32f2f0d 59BuildRequires: autoconf
7c675e43 60%{?with_tests:BuildRequires: autogen}
b3f5aea2 61BuildRequires: automake
700c2625
MP
62# binutils 2.16.91 or newer are required for compiling medium model now
63BuildRequires: binutils >= 2:2.16.91.0.1
df0fb473 64BuildRequires: bison
6aca12cf 65BuildRequires: chrpath >= 0.10
7c675e43 66%{?with_tests:BuildRequires: dejagnu}
dfb16231 67BuildRequires: fileutils >= 4.0.41
fa7ab34d 68BuildRequires: flex
6455683d 69BuildRequires: gettext-devel
6aca12cf 70BuildRequires: glibc-devel >= 6:2.3
1d23d810 71BuildRequires: perl-base
e9b273c0 72BuildRequires: rpmbuild(macros) >= 1.211
f32f2f0d
JB
73BuildRequires: texinfo >= 4.1
74BuildRequires: 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
78Requires: binutils >= 2:2.16.90.0.1-0.3
6aca12cf
AM
79Requires: libgcc4 = %{epoch}:%{version}-%{release}
80Provides: cpp4 = %{epoch}:%{version}-%{release}
90d494b3 81BuildRoot: %{tmpdir}/%{sname}-%{version}-root-%(id -u -n)
5daa5407 82
81c90c73 83%define _slibdir /%{_lib}
6bb6b7cc 84
5daa5407 85%description
8774fb0d
JR
86A compiler aimed at integrating all the optimizations and features
87necessary for a high-performance and stable development environment.
5daa5407 88
44aaa0d4 89This package contains the C compiler and some files shared by various
90parts of the GNU Compiler Collection. In order to use another GCC
91compiler you will need to install the appropriate subpackage.
92
d3e46e1f 93%description -l es.UTF-8
064be8f7 94Un compilador que intenta integrar todas las optimalizaciones y
d3e46e1f 95características necesarias para un entorno de desarrollo eficaz y
064be8f7
JB
96estable.
97
98Este paquete contiene el compilador de C y unos ficheros compartidos
d3e46e1f
JR
99por varias partes de la colección de compiladores GNU (GCC). Para usar
100otro compilador de GCC será necesario que instale el subpaquete
064be8f7
JB
101adecuado.
102
d3e46e1f
JR
103%description -l pl.UTF-8
104Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do
e41aa012 105wyprodukowania szybkiego i stabilnego kodu wynikowego.
dfb16231 106
d3e46e1f
JR
107Ten pakiet zawiera kompilator C i pliki współdzielone przez różne
108części kolekcji kompilatorów GNU (GCC). Żeby używać innego kompilatora
109z GCC, trzeba zainstalować odpowiedni podpakiet.
44aaa0d4 110
d3e46e1f
JR
111%description -l pt_BR.UTF-8
112Este pacote adiciona infraestrutura básica e suporte a linguagem C ao
064be8f7
JB
113GNU Compiler Collection.
114
90d494b3 115%package -n libgcc4
dfb16231 116Summary: Shared gcc library
1f141173
ER
117Summary(es.UTF-8): Biblioteca compartida de gcc
118Summary(pl.UTF-8): Biblioteka gcc
119Summary(pt_BR.UTF-8): Biblioteca runtime para o GCC
59c005c7 120License: GPL with unlimited link permission
dfb16231 121Group: Libraries
dfb16231 122
90d494b3 123%description -n libgcc4
dfb16231
MM
124Shared gcc library.
125
d3e46e1f 126%description -n libgcc4 -l es.UTF-8
064be8f7
JB
127Biblioteca compartida de gcc.
128
d3e46e1f 129%description -n libgcc4 -l pl.UTF-8
dfb16231 130Biblioteka dynamiczna gcc.
8774fb0d 131
d3e46e1f 132%description -n libgcc4 -l pt_BR.UTF-8
064be8f7
JB
133Biblioteca 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 172sed -i 's:#define VERSUFFIX.*:#define VERSUFFIX " (PLD-Linux)":' gcc/version.c
80bd8096 173perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c
55d24315 174
fa7ab34d
PS
175mv ChangeLog ChangeLog.general
176
5daa5407 177%build
fa7ab34d
PS
178cd gcc
179%{__autoconf}
180cd ..
700c2625
MP
181cd libjava
182%{__autoconf}
183cd classpath
e7ee880c
PS
184%{__autoconf}
185cd ../..
fa7ab34d 186cp -f /usr/share/automake/config.sub .
0a189d1d 187
700c2625 188rm -rf builddir && install -d builddir && cd builddir
af50fe63 189
f1f6fd72 190CFLAGS="%{rpmcflags}" \
ca3fedb4 191CXXFLAGS="%{rpmcxxflags}" \
26fa47ad
JB
192TEXCONFIG=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 227cd ..
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
242rm -rf $RPM_BUILD_ROOT
fa7ab34d 243install -d $RPM_BUILD_ROOT{/lib,%{_aclocaldir},%{_datadir},%{_infodir}}
8774fb0d 244
700c2625 245cd 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
252install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version}
253
397739ba 254%ifarch sparc64
6aca12cf
AM
255ln -sf %{_bindir}/sparc64-pld-linux-gcc4 \
256 $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc4
397739ba 257%endif
258
6aca12cf
AM
259ln -sf %{_bindir}/cpp4 $RPM_BUILD_ROOT/lib/cpp4
260ln -sf gcc4 $RPM_BUILD_ROOT%{_bindir}/cc4
261echo ".so gcc4.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc4.1
8774fb0d 262
6d54da48 263libssp=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libssp.so.*.*.*)
9abb5329 264mv $RPM_BUILD_ROOT{%{_libdir}/$libssp,%{_slibdir}}
6d54da48 265ln -sf %{_slibdir}/$libssp $RPM_BUILD_ROOT%{_libdir}/libssp.so
dfb16231 266
dfb16231
MM
267cd ..
268
d061c086
MM
269# include/ contains install-tools/include/* and headers that were fixed up
270# by fixincludes, we don't want former
fa7ab34d 271gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
d9101cfa 272mkdir $gccdir/tmp
90d494b3 273
d061c086 274# we have to save these however
1651e3ac 275mv $gccdir/include/syslimits.h $gccdir/tmp
700c2625 276mv $gccdir/include/ssp $gccdir/tmp
1651e3ac
PS
277rm -rf $gccdir/include
278mv $gccdir/tmp $gccdir/include
279cp $gccdir/install-tools/include/*.h $gccdir/include
d061c086 280# but we don't want anything more from install-tools
1651e3ac 281rm -rf $gccdir/install-tools
d061c086 282
d9101cfa 283%find_lang gcc
700c2625
MP
284%find_lang cpplib
285cat 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
294rm -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.*
This page took 0.233643 seconds and 4 git commands to generate.