]> git.pld-linux.org Git - packages/gcc4.git/blob - gcc4.spec
- additional gcc (4.1.1 release) for Ac
[packages/gcc4.git] / gcc4.spec
1 #
2 # Conditional build:
3 %bcond_with     profiling       # build with profiling
4 %bcond_without  bootstrap       # omit 3-stage bootstrap
5 %bcond_with     tests           # torture gcc
6
7 %if %{without bootstrap}
8 %undefine       with_profiling
9 %endif
10
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
15 %define sname   gcc
16 Name:           %{sname}4
17 Version:        4.1.1
18 #define         _snap   20060515r113785
19 #define         _snap   20060517
20 #Release:       0.%{_snap}.1
21 Release:        1
22 Epoch:          5
23 License:        GPL v2+
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
41
42 # PRs
43 Patch10:        %{name}-pr7776.patch
44 Patch11:        %{name}-pr19606.patch
45 Patch12:        %{name}-pr24879.patch
46 Patch13:        %{name}-pr26435-pr20256.patch
47
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
55
56 Patch25:        %{name}-libjava-multilib.patch
57 Patch26:        %{name}-ppc64-m32-m64-multilib-only.patch
58 Patch27:        %{name}-enable-java-awt-qt.patch
59
60 # 128-bit long double support for glibc 2.4
61 Patch30:        %{name}-ldbl-default-libstdc++.patch
62 Patch31:        %{name}-ldbl-default.patch
63
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
70 BuildRequires:  bison
71 BuildRequires:  chrpath >= 0.13-2
72 %{?with_tests:BuildRequires:    dejagnu}
73 BuildRequires:  fileutils >= 4.0.41
74 BuildRequires:  flex
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}
87 Obsoletes:      cpp
88 Obsoletes:      egcs-cpp
89 Obsoletes:      gcc-chill
90 Obsoletes:      gcc-cpp
91 Obsoletes:      gcc-ksi
92 Obsoletes:      gont
93 Conflicts:      glibc-devel < 2.2.5-20
94 BuildRoot:      %{tmpdir}/%{sname}-%{version}-root-%(id -u -n)
95
96 %define         _slibdir        /%{_lib}
97
98 %description
99 A compiler aimed at integrating all the optimizations and features
100 necessary for a high-performance and stable development environment.
101
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.
105
106 %description -l es
107 Un compilador que intenta integrar todas las optimalizaciones y
108 características necesarias para un entorno de desarrollo eficaz y
109 estable.
110
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
114 adecuado.
115
116 %description -l pl
117 Kompilator, posiadaj±cy du¿e mo¿liwo¶ci optymalizacyjne niezbêdne do
118 wyprodukowania szybkiego i stabilnego kodu wynikowego.
119
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.
123
124 %description -l pt_BR
125 Este pacote adiciona infraestrutura básica e suporte a linguagem C ao
126 GNU Compiler Collection.
127
128 %package -n libgcc4
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
134 Group:          Libraries
135 Obsoletes:      libgcc1
136
137 %description -n libgcc4
138 Shared gcc library.
139
140 %description -n libgcc4 -l es
141 Biblioteca compartida de gcc.
142
143 %description -n libgcc4 -l pl
144 Biblioteka dynamiczna gcc.
145
146 %description -n libgcc4 -l pt_BR
147 Biblioteca runtime para o GCC.
148
149 %prep
150 %setup -q -n gcc-%{version}
151
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155 %patch3 -p1
156 %patch4 -p1
157 %patch5 -p1
158
159 # -fvisbility fixes...
160 %patch6 -p1
161 %patch7 -p1
162 %patch8 -p1
163
164 # PRs
165 %patch10 -p1
166 %patch11 -p0
167 %patch12 -p0
168 %patch13 -p1
169
170 %patch17 -p1
171 %patch18 -p1
172 %patch19 -p1
173 %patch20 -p1
174 %patch21 -p1
175 %patch22 -p1
176 %patch23 -p1
177
178 %patch25 -p1
179 %patch26 -p1
180 %patch27 -p1
181
182 %patch30 -p0
183 %patch31 -p0
184
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
188
189 mv ChangeLog ChangeLog.general
190
191 %build
192 cd gcc
193 %{__autoconf}
194 cd ..
195 cd libjava
196 %{__autoconf}
197 cd classpath
198 %{__autoconf}
199 cd ../..
200 cp -f /usr/share/automake/config.sub .
201
202 rm -rf builddir && install -d builddir && cd builddir
203
204 CFLAGS="%{rpmcflags}" \
205 CXXFLAGS="%{rpmcxxflags}" \
206 TEXCONFIG=false \
207 ../configure \
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} \
215         --enable-shared \
216         --enable-threads=posix \
217         --enable-languages="c" \
218         --enable-c99 \
219         --enable-long-long \
220         --enable-nls \
221         --disable-werror \
222         --with-gnu-as \
223         --with-gnu-ld \
224         --with-demangler-in-ld \
225         --with-system-zlib \
226         --with-slibdir=%{_slibdir} \
227 %ifnarch ia64
228         --without-system-libunwind \
229 %else
230         --with-system-libunwind \
231 %endif
232         --without-x \
233         --with-long-double-128 \
234 %ifarch ppc ppc64
235         --enable-secureplt \
236 %endif
237         %{_target_platform}
238
239 cd ..
240
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}" \
248         mandir=%{_mandir} \
249         infodir=%{_infodir}
250
251 %{?with_tests:%{__make} -k -C builddir check 2>&1 ||:}
252
253 %install
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{/lib,%{_aclocaldir},%{_datadir},%{_infodir}}
256
257 cd builddir
258
259 %{__make} -j1 install \
260         mandir=%{_mandir} \
261         infodir=%{_infodir} \
262         DESTDIR=$RPM_BUILD_ROOT
263
264 install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version}
265
266 %ifarch sparc64
267 ln -sf  %{_bindir}/sparc64-pld-linux-gcc \
268         $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
269 %endif
270
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
274
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
278
279 cd ..
280
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/*/*/)
284 mkdir   $gccdir/tmp
285
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
294
295 %find_lang gcc
296 %find_lang cpplib
297 cat cpplib.lang >> gcc.lang
298
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
304
305 %clean
306 rm -rf $RPM_BUILD_ROOT
307
308 %post
309 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
310
311 %postun
312 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
313
314 %post   -p /sbin/ldconfig -n libgcc4
315 %postun -p /sbin/ldconfig -n libgcc4
316
317 %files -f gcc.lang
318 %defattr(644,root,root,755)
319 %doc ChangeLog.general MAINTAINERS NEWS
320 # bugs.html faq.html
321 %doc gcc/{ChangeLog,ONEWS,README.Portability}
322 %dir %{_libdir}/gcc
323 %dir %{_libdir}/gcc/*
324 %dir %{_libdir}/gcc/*/*
325 %dir %{_libdir}/gcc/*/*/include
326 %dir %{_libdir}/gcc/*/*/include/ssp
327
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
334
335 %{_mandir}/man1/cc.1*
336 %{_mandir}/man1/cpp.1*
337 %{_mandir}/man1/gcc.1*
338 %{_mandir}/man1/gcov.1*
339
340 %{_infodir}/cpp*
341 %{_infodir}/gcc*
342
343 %attr(755,root,root) /lib/cpp
344
345 %attr(755,root,root) %{_slibdir}/lib*.so
346 %{_libdir}/libssp.a
347 %{_libdir}/libssp.la
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
358
359 %{_libdir}/gcc/*/*/include/*.h
360 %{_libdir}/gcc/*/*/include/ssp/*.h
361
362 %files -n libgcc4
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_slibdir}/lib*.so.*
This page took 0.102914 seconds and 3 git commands to generate.