]> git.pld-linux.org Git - packages/gcc.git/blob - gcc.spec
626adb1a3cd303f292f66188d06c683cd8bd1092
[packages/gcc.git] / gcc.spec
1 #
2 # Conditional build:
3 # _without_ada  - build without ADA support
4 # _without_java - build without Java support
5 #
6 %define         DASHED_SNAP     %{nil}
7 %define         SNAP            %(echo %{DASHED_SNAP} | sed -e "s#-##g")
8 %define         GCC_VERSION     3.2
9 %define         KSI_VERSION     pre55
10
11 Summary:        GNU Compiler Collection
12 Summary(pl):    Kolekcja kompilatorów GNU
13 Name:           gcc
14 Version:        %{GCC_VERSION}
15 Release:        9
16 License:        GPL
17 Group:          Development/Languages
18 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/%{name}-%{GCC_VERSION}.tar.bz2
19 Source1:        ftp://ftp.pld.org.pl/people/malekith/ksi/ksi-%{KSI_VERSION}.tar.gz
20 Patch0:         %{name}-slibdir.patch
21 Patch1:         %{name}-paths.patch
22 Patch2:         %{name}-ada-no-addr2line.patch
23 Patch3:         %{name}-ada-no-prefix.o.patch
24 Patch4:         %{name}-nolocalefiles.patch
25 Patch5:         %{name}-march-i686-fix.patch
26 Patch6:         %{name}-loop-ice.patch
27 Patch7:         %{name}-mmx-ice.patch
28 Patch8:         %{name}-mmx-sse-defines.patch
29 Patch9:         %{name}-athlon-move-costs.patch
30 # -- stolen patches from RH --
31 Patch10:        gcc32-ada-link.patch
32 Patch11:        gcc32-attr-visibility.patch
33 Patch12:        gcc32-attr-visibility2.patch
34 Patch13:        gcc32-attr-visibility3.patch
35 Patch14:        gcc32-attr-visibility4.patch
36 Patch15:        gcc32-attr-visibility5.patch
37 Patch16:        gcc32-boehm-gc-libs.patch
38 Patch17:        gcc32-bogus-inline.patch
39 Patch18:        gcc32-c++-nrv-test.patch
40 Patch19:        gcc32-c++-pretty_function.patch
41 # evil? introduced ICE at cp/cp-lang.c:130
42 Patch20:        gcc32-c++-tail-pad.patch
43 Patch21:        gcc32-c++-tail-pad2.patch
44 Patch22:        gcc32-c++-tsubst-asm.patch
45 Patch23:        gcc32-cfg-eh.patch
46 Patch24:        gcc32-debug-pr7241.patch
47 Patch25:        gcc32-doc-gcov.patch 
48 Patch26:        gcc32-duplicate-decl.patch
49 Patch27:        gcc32-dwarf2-pr6381.patch 
50 Patch28:        gcc32-dwarf2-pr6436-test.patch
51 Patch29:        gcc32-fde-merge-compat.patch 
52 Patch30:        gcc32-fold-const-associate.patch
53 Patch31:        gcc32-fold-const2.patch
54 Patch32:        gcc32-hard-reg-sharing.patch
55 Patch33:        gcc32-hard-reg-sharing2.patch 
56 Patch34:        gcc32-i386-default-momit-leaf-frame-pointer.patch
57 Patch35:        gcc32-i386-memtest-test.patch 
58 Patch36:        gcc32-i386-no-default-momit-leaf-frame-pointer.patch
59 Patch37:        gcc32-i386-pic-label-thunk.patch
60 # included in gcc-mmx-sse-defines.patch
61 #Patch38:       gcc32-i386-pr7242.patch
62 Patch39:        gcc32-i386-profile-olfp.patch
63 Patch40:        gcc32-inline-label.patch 
64 Patch41:        gcc32-java-no-rpath.patch
65 Patch42:        gcc32-loop-prefetch.patch 
66 Patch43:        gcc32-pr6842.patch 
67 Patch44:        gcc32-rh69989.patch
68 Patch45:        gcc32-sparc-sll1.patch
69 Patch46:        gcc32-test-rh65771.patch 
70 Patch47:        gcc32-test-rotate.patch  
71 Patch48:        gcc32-tls-dwarf2.patch 
72 Patch49:        gcc32-tls.patch      
73 Patch50:        gcc32-tls2.patch 
74 Patch51:        gcc32-tls3.patch
75 Patch52:        gcc32-tls4.patch 
76 Patch53:        gcc32-tls5.patch    
77 #Patch54:       gcc32-tree-code.patch      
78 #Patch55:       gcc32-trunc_int_for_mode.patch 
79 Patch56:        gcc32-typeof-asm.patch  
80 Patch57:        gcc32-typeof-skip-eval.patch 
81
82 Patch58:        gcc32-locale_in_monetary_members.patch
83 Patch59:        gcc32-locale_in_ctype_members.patch
84 Patch60:        gcc32-locale_in_ctype_members_header.patch
85 Patch61:        gcc32-libstdc++-glibc.patch
86
87 BuildRequires:  bison
88 BuildRequires:  texinfo >= 4.1
89 BuildRequires:  zlib-devel
90 BuildRequires:  fileutils >= 4.0.41
91 BuildRequires:  autoconf
92 BuildRequires:  gcc
93 %{!?_without_ada:BuildRequires: gcc-ada}
94 BuildRequires:  perl-devel
95 Requires:       binutils >= 2.12.90.0.4
96 Requires:       cpp = %{GCC_VERSION}
97 Requires:       libgcc = %{GCC_VERSION}
98 Conflicts:      glibc-devel < 2.2.5-20
99 URL:            http://gcc.gnu.org/
100 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
102 %define         _slibdir        /lib
103
104 %description
105 A compiler aimed at integrating all the optimizations and features
106 necessary for a high-performance and stable development environment.
107
108 %description -l pl
109 Kompilator, posiadaj±cy du¿e mo¿liwo¶ci optymalizacyjne niezbêdne do
110 wyprodukowania szybkiego i stablinego kodu wynikowego.
111
112 %package -n libgcc
113 Summary:        Shared gcc library
114 Summary(pl):    Biblioteka gcc
115 Group:          Libraries
116 Version:        %{GCC_VERSION}
117
118 %description -n libgcc
119 Shared gcc library.
120
121 %description -n libgcc -l pl
122 Biblioteka dynamiczna gcc.
123
124 %package c++
125 Summary:        C++ support for gcc
126 Summary(pl):    Obs³uga C++ dla gcc
127 Group:          Development/Languages
128 Obsoletes:      egcc-c++
129 Obsoletes:      egcs-c++
130 Requires:       gcc = %{GCC_VERSION}
131
132 %description c++
133 This package adds C++ support to the GNU C compiler. It includes
134 support for most of the current C++ specification, including templates
135 and exception handling. It does not include a standard C++ library,
136 which is available separately.
137
138 %description c++ -l de
139 Dieses Paket enthält die C++-Unterstützung für den GNU-C-Compiler. Es
140 unterstützt die aktuelle C++-Spezifikation, inkl. Templates und
141 Ausnahmeverarbeitung. Eine C++-Standard-Library ist nicht enthalten -
142 sie ist getrennt erhältlich.
143
144 %description c++ -l fr
145 Ce package ajoute un support C++ au compilateur c GNU. Il comprend un
146 support pour la plupart des spécifications actuelles de C++, dont les
147 modéles et la gestion des exceptions. Il ne comprend pas une
148 bibliothéque C++ standard, qui est disponible séparément.
149
150 %description c++ -l pl
151 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc. Ma wsparcie dla
152 du¿ej ilo¶ci obecnych specyfikacji C++, nie zawiera natomiast
153 standardowych bibliotek C++, które s± w oddzielnym pakiecie.
154
155 %description c++ -l tr
156 Bu paket, GNU C derleyicisine C++ desteði ekler. 'Template'ler ve
157 aykýrý durum iþleme gibi çoðu güncel C++ tanýmlarýna uyar. Standart
158 C++ kitaplýðý bu pakette yer almaz.
159
160 %package objc
161 Summary:        Objective C support for gcc
162 Summary(de):    Objektive C-Unterstützung für gcc
163 Summary(fr):    Gestion d'Objective C pour gcc
164 Summary(pl):    Obs³uga obiektowego C dla kompilatora gcc
165 Summary(tr):    gcc için Objective C desteði
166 Group:          Development/Languages
167 Obsoletes:      egcc-objc
168 Obsoletes:      egcs-objc
169 Requires:       libobjc = %{GCC_VERSION}
170 Requires:       gcc = %{GCC_VERSION}
171
172 %description objc
173 This package adds Objective C support to the GNU C compiler. Objective
174 C is a object oriented derivative of the C language, mainly used on
175 systems running NeXTSTEP. This package does not include the standard
176 objective C object library.
177
178 %description objc -l de
179 Dieses Paket ergänzt den GNU-C-Compiler durch Objective-C-Support.
180 Objective C ist ein objektorientiertes Derivat von C, das zur
181 Hauptsache auf Systemen mit NeXTSTEP zum Einsatz kommt. Die
182 Standard-Objective-C-Objekt-Library ist nicht Teil des Pakets.
183
184 %description objc -l fr
185 Ce package ajoute un support Objective C au compilateur C GNU.
186 L'Objective C est un langage orienté objetdérivé du langage C,
187 principalement utilisé sur les systèmes NeXTSTEP. Ce package n'inclue
188 pas la bibliothéque Objective C standard.
189
190 %description objc -l pl
191 Ten pakiet dodaje obs³ugê obiektowego C do kompilatora gcc. Obiektowe
192 C (objc) jest zorientowan± obiektowo pochodn± jêzyka C, u¿ywan±
193 g³ównie w systemach u¿ywaj±cych NeXTSTEP. W pakiecie nie ma
194 standardowej biblioteki objc (która znajduje siê w osobnym pakiecie).
195
196 %description objc -l tr
197 Bu paket, GNU C derleyicisine Objective C desteði ekler. Objective C,
198 C dilinin nesne yönelik bir türevidir ve NeXTSTEP altýnda çalýþan
199 sistemlerde yaygýn olarak kullanýlýr. Standart Objective C nesne
200 kitaplýðý bu pakette yer almaz.
201
202 %package -n libobjc
203 Summary:        Objective C Libraries
204 Summary(pl):    Biblioteki Obiektowego C
205 Group:          Libraries
206 Version:        %{GCC_VERSION}
207 Epoch:          3
208
209 %description -n libobjc
210 Objective C Libraries.
211
212 %description -n libobjc -l pl
213 Biblioteki Obiektowego C.
214
215 %package -n libobjc-static
216 Summary:        Static Objective C Libraries
217 Summary(pl):    Statyczne Biblioteki Obiektowego C
218 Group:          Development/Libraries
219 Version:        %{GCC_VERSION}
220 Epoch:          4
221 Requires:       libobjc = %{GCC_VERSION}
222
223 %description -n libobjc-static
224 Static Objective C Libraries.
225
226 %description -n libobjc-static -l pl
227 Statyczne biblioteki Obiektowego C.
228
229 %package g77
230 Summary:        Fortran 77 support for gcc
231 Summary(pl):    Obs³uga Fortranu 77 dla gcc
232 Group:          Development/Languages
233 Version:        %{GCC_VERSION}
234 Obsoletes:      egcs-g77
235 Requires:       libg2c = %{GCC_VERSION}
236
237 %description g77
238 This apckage adds support for compiling Fortran 77 programs with the
239 GNU compiler.
240
241 %description g77 -l pl
242 Ten pakiet dodaje obs³ugê Fortranu 77 do kompilatora gcc. Jest
243 potrzebny do kompilowania programów pisanych w jêzyku Fortran 77.
244
245 %package -n libg2c
246 Summary:        Fortran 77 Libraries
247 Summary(pl):    Biblioteki Fortranu 77
248 Group:          Libraries
249 Version:        %{GCC_VERSION}
250
251 %description -n libg2c
252 Fortran 77 Libraries.
253
254 %description -n libg2c -l pl
255 Biblioteki Fortranu 77.
256
257 %package -n libg2c-static
258 Summary:        Static Fortran 77 Libraries
259 Summary(pl):    Statyczne Biblioteki Fortranu 77
260 Group:          Development/Libraries
261 Version:        %{GCC_VERSION}
262 Epoch:          2
263 Requires:       libg2c = %{GCC_VERSION}
264
265 %description -n libg2c-static
266 Static Fortran 77 Libraries.
267
268 %description -n libg2c-static -l pl
269 Statyczne biblioteki Fortranu 77.
270
271 %package java
272 Summary:        Java support for gcc
273 Summary(pl):    Obs³uga Javy dla gcc
274 Group:          Development/Languages
275 Version:        %{GCC_VERSION}
276 Requires:       %{name} = %{version}
277 Requires:       libgcj >= 3.0.0
278 Provides:       gcj = %{epoch}:%{GCC_VERSION}-%{release}
279 Provides:       jar = %{epoch}:%{GCC_VERSION}-%{release}
280
281 %description java
282 This package adds experimental support for compiling Java(tm) programs
283 and bytecode into native code. To use this you will also need the
284 libgcj package.
285
286 %description -l pl java
287 Wsparcie dla kompilowania programów Java(tm) zrówno do bajt-kodu jak i
288 do natywnego kodu. Dodatkowo wymagany jest pakiet libgcj, aby mo¿na
289 by³o przeprowadziæ kompilacjê.
290
291 %package -n libgcj
292 Summary:        Java Class Libraries
293 Summary(pl):    Biblioteki Klas Javy
294 Group:          Libraries
295 Version:        %{GCC_VERSION}
296 Epoch:          2
297 Requires:       zlib
298
299 %description -n libgcj
300 Java Class Libraries.
301
302 %description -n libgcj -l pl
303 Biblioteki Klas Javy.
304
305 %package -n libgcj-devel
306 Summary:        Development files for Java Class Libraries
307 Summary(pl):    Pliki nag³ówkowe dla Bibliotek Klas Javy
308 Group:          Development/Libraries
309 Version:        %{GCC_VERSION}
310 Epoch:          2
311 Requires:       libgcj = %{GCC_VERSION}
312 Requires:       %{name}-java
313
314 %description -n libgcj-devel
315 Development files for Java Class Libraries.
316
317 %description -n libgcj-devel -l pl
318 Pliki nag³ówkowe dla Bibliotek Klas Javy.
319
320 %package -n libgcj-static
321 Summary:        Static Java Class Libraries
322 Summary(pl):    Statyczne Biblioteki Klas Javy
323 Group:          Development/Libraries
324 Version:        %{GCC_VERSION}
325 Epoch:          2
326 Requires:       libstdc++-devel = %{GCC_VERSION}
327 Requires:       libgcj-devel = %{GCC_VERSION}
328
329 %description -n libgcj-static
330 Static Java Class Libraries.
331
332 %description -n libgcj-static -l pl
333 Statyczne Biblioteki Klas Javy.
334
335 %package -n libstdc++
336 Summary:        GNU c++ library
337 Summary(pl):    Biblioteki GNU C++ 
338 Group:          Libraries
339 Version:        %{GCC_VERSION}
340 Epoch:          1
341 Obsoletes:      libg++
342
343 %description -n libstdc++
344 This is the GNU implementation of the standard C++ libraries, along
345 with additional GNU tools. This package includes the shared libraries
346 necessary to run C++ applications.
347
348 %description -n libstdc++ -l de
349 Dies ist die GNU-Implementierung der Standard-C++-Libraries mit
350 weiteren GNU-Tools. Dieses Paket enthält die zum Ausführen von
351 C++-Anwendungen erforderlichen gemeinsam genutzten Libraries.
352
353 %description -n libstdc++ -l fr
354 Ceci est l'implémentation GNU des librairies C++ standard, ainsi que
355 des outils GNU supplémentaires. Ce package comprend les librairies
356 partagées nécessaires à l'exécution d'application C++.
357
358 %description -n libstdc++ -l pl
359 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
360 bibliotek C++. Znajduj± siê w nim biblioteki dynamiczne niezbêdne do
361 uruchomienia aplikacji napisanych w C++.
362
363 %description -n libstdc++ -l tr
364 Bu paket, standart C++ kitaplýklarýnýn GNU gerçeklemesidir ve C++
365 uygulamalarýnýn koþturulmasý için gerekli kitaplýklarý içerir.
366
367 %package -n libstdc++-devel
368 Summary:        Header files and documentatino for C++ development
369 Summary(de):    Header-Dateien zur Entwicklung mit C++
370 Summary(fr):    Fichiers d'en-tête et biblitothèques pour développer en C++.
371 Summary(pl):    Pliki nag³ówkowe i dokumentacja do biblioteki standardowej C++
372 Summary(tr):    C++ ile program geliþtirmek için gerekli dosyalar
373 Group:          Development/Libraries
374 Version:        %{GCC_VERSION}
375 Epoch:          1
376 Requires:       libstdc++ = %{GCC_VERSION}
377 Requires:       %{name}-c++
378 Obsoletes:      libg++-devel
379
380 %description -n libstdc++-devel
381 This is the GNU implementation of the standard C++ libraries. This
382 package includes the header files needed for C++ development and
383 library documentation.
384
385 %description -n libstdc++-devel -l pl
386 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
387 bibliotek C++. Znajduj± siê w nim pliki nag³ówkowe wykorzystywane przy
388 programowaniu w jêzyku C++ oraz dokumentacja biblioteki standardowej.
389
390 %package -n libstdc++-static
391 Summary:        Static C++ standard library
392 Summary(pl):    Statyczna biblioteka standardowa C++
393 Group:          Development/Libraries
394 Version:        %{GCC_VERSION}
395 Epoch:          1
396 Requires:       libstdc++-devel = %{GCC_VERSION}
397
398 %description -n libstdc++-static
399 Static C++ standard library.
400
401 %description -n libstdc++-static -l pl
402 Statycza biblioteka standardowa C++.
403
404 %package ada
405 Summary:        Ada support for gcc
406 Summary(pl):    Obs³uga Ady do gcc
407 Group:          Development/Languages
408 Version:        %{GCC_VERSION}
409 Requires:       libgnat = %{GCC_VERSION}
410 Requires:       gcc = %{GCC_VERSION}
411 Obsoletes:      gnat-devel
412
413 %description ada
414 This package adds experimental support for compiling Ada programs.
415
416 %description -l pl ada
417 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
418 w Adzie.
419
420 %package -n libgnat
421 Summary:        Ada standard libraries
422 Summary(pl):    Biblioteki standardowe dla Ady
423 Group:          Libraries
424 Version:        %{GCC_VERSION}
425 Obsoletes:      gnat
426
427 %description -n libgnat
428 This package contains shared libraries needed to run programs written
429 in Ada.
430
431 %description -n libgnat -l pl
432 Ten pakiet zawiera biblioteki potrzebne do uruchamiania programów napisanych
433 w Adzie.
434
435 %package -n libgnat-static
436 Summary:        Static Ada standard libraries
437 Summary(pl):    Statyczne biblioteki standardowe dla Ady
438 Group:          Libraries
439 Version:        %{GCC_VERSION}
440 Obsoletes:      gnat-static
441
442 %description -n libgnat-static
443 This package contains static libraries for programs written in Ada.
444
445 %description -n libgnat-static -l pl
446 Ten pakiet zawiera biblioteki statyczne dla programów napisanych w
447 Adzie.
448
449 %package ksi
450 Summary:        Ksi support for gcc
451 Summary(pl):    Obs³uga Ksi dla gcc
452 Version:        %{GCC_VERSION}.%{KSI_VERSION}
453 Group:          Development/Languages
454 Requires:       gcc = %{GCC_VERSION}
455
456 %description ksi
457 This package adds experimental support for compiling Ksi programs
458 into native code. You proabably don't need it, unless your are going
459 to develop a compiler using Ksi as intermediate representation or
460 you are using such compiler (like Gont).
461
462 %description ksi -l pl
463 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
464 w Ksi do kodu maszynowego. Prawdopodobnie nie potrzebujesz go, chyba
465 ¿e zamierzasz pisaæ kompilator u¿ywaj±cy Ksi jako reprezentacji
466 po¶rednicz±cej, lub u¿ywasz takiego kompilatora (jak Gont).
467
468 %package -n cpp
469 Summary:        The C Pre Processor
470 Summary(pl):    Preprocesor C
471 Group:          Development/Languages
472 Version:        %{GCC_VERSION}
473 Obsoletes:      egcs-cpp
474 Obsoletes:      gcc-cpp
475
476 %description -n cpp
477 The C preprocessor is a "macro processor" that is used automatically
478 by the C compiler to transform your program before actual compilation.
479 It is called a macro processor because it allows you to define
480 "macros", which are brief abbreviations for longer constructs.
481
482 The C preprocessor provides four separate facilities that you can use
483 as you see fit:
484
485 - Inclusion of header files. These are files of declarations that can
486   be substituted into your program.
487 - Macro expansion. You can define "macros", which are abbreviations
488   for arbitrary fragments of C code, and then the C preprocessor will
489   replace the macros with their definitions throughout the program.
490 - Conditional compilation. Using special preprocessing directives, you
491   can include or exclude parts of the program according to various
492   conditions.
493 - Line control. If you use a program to combine or rearrange source
494   files into an intermediate file which is then compiled, you can use
495   line control to inform the compiler of where each source line
496   originally came from.
497
498 %description -n cpp -l pl
499 Przeprocesor C jest "makro procesorem" który jest automatycznie
500 u¿ywany przez kompilator C do obróbki kompilowanego programu przed
501 w³a¶ciw± kompilacj±. Jest on nazywany makroprocesorem, poniewa¿
502 umo¿liwia definiowanie i rozwijanie makr umo¿liwiaj±cych skracanie
503 d³ugich konstrukcji w jêzyku C.
504
505 Preprocesor C umo¿liwia wykonywanie czterech ró¿nych typów operacji:
506
507 - Do³±czanie plików (np. nag³ówkowych). Wstawia pliki w miejscu
508   deklaracji polecenia do³±czenia innego pliku.
509 - Rozwijanie makr. Mo¿na definiowaæ "makra" nadaj±c im identyfikatory,
510   których pó¼niejsze u¿ycie powoduje podczas rozwijania podmienienie
511   indentyfikatora deklarowan± wcze¶niej warto¶ci±.
512 - Kompilacja warunkowa. W zale¿no¶ci od obecno¶ci symboli i dyrektyw w
513   ¶rodowisku preprocesora s± w³±czane warunkowo, b±d¼ nie, pewne
514   fragmenty obrabianego strumienia tekstów.
515 - Kontrola linii ¼ród³a. Niezale¿nie od tego jakim przeobra¿eniom
516   podlega wynikowy strumieñ danych w wyniku rozwijania makr i do³±czania
517   s± zapamiêtywane informacje o tym, której linii pliku ¼ród³owego
518   odpowiada fragment pliku wynikowego.
519
520 %prep
521 %setup -q -a1 -n %{name}-%{GCC_VERSION}
522 mv ksi-%{KSI_VERSION} gcc/ksi
523 %patch0 -p1
524 %patch1 -p1
525 %patch2 -p1
526 %patch3 -p1
527 %patch4 -p1
528 %ifarch %{ix86}
529 %patch5 -p0
530 %endif
531 %patch6 -p1
532 %patch7 -p1
533 %patch8 -p1
534 %patch9 -p1
535 %patch10 
536 %patch11 
537 %patch12 
538 %patch13 
539 %patch14 
540 %patch15 
541 %patch16 
542 %patch17 
543 %patch18 
544 %patch19 
545 #%patch20       # introduced ICE at cp/cp-lang.c:130
546 %patch21 
547 %patch22 
548 %patch23 
549 %patch24 
550 %patch25 
551 %patch26 
552 %patch27 
553 %patch28 
554 %patch29 
555 %patch30 
556 %patch31 
557 %patch32 
558 %patch33 
559 %patch34 
560 %patch35 
561 %patch36 
562 %patch37 
563 #%patch38       # included in gcc-mmx-sse-defines.patch
564 %patch39 
565 %patch40 
566 %patch41 
567 %patch42 
568 %patch43 
569 %patch44 
570 %patch45 
571 %patch46 
572 %patch47 
573 %patch48 
574 %patch49 
575 %patch50 
576 %patch51 
577 %patch52 
578 %patch53 
579 #%patch54 
580 #%patch55 
581 %patch56 
582 %patch57 
583 %patch58
584 %patch59 
585 %patch60
586 %patch61
587
588 %build
589 # cd gcc && autoconf; cd ..
590 # autoconf is not needed!
591 rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform}
592
593 CFLAGS="%{rpmcflags}" \
594 CXXFLAGS="%{rpmcflags}" \
595 TEXCONFIG=false ../configure \
596         --prefix=%{_prefix} \
597         --infodir=%{_infodir} \
598         --mandir=%{_mandir} \
599         --enable-shared \
600         --enable-threads=posix \
601         --enable-__cxa_atexit \
602         --enable-languages="c,c++,f77,gcov,objc,ksi%{!?_without_ada:,ada}%{!?_without_java:,java}" \
603         --enable-c99 \
604         --enable-long-long \
605         --enable-multilib \
606         --enable-nls \
607         --with-gnu-as \
608         --with-gnu-ld \
609         --with-system-zlib \
610         --with-slibdir=%{_slibdir} \
611         --without-x \
612         %{_target_platform}
613
614 PATH=$PATH:/sbin:%{_sbindir}
615
616 # this dirty hack is relict of setting, where objdir is subdir of srcdir
617 %if %{!?_without_ada:1}%{?_without_ada:0}
618 sed -e 's/srcdir=\$(fsrcdir)/srcdir=\$(fsrcdir) VPATH=\$(fsrcdir)/' \
619         gcc/ada/Makefile > makefile.tmp
620 mv -f makefile.tmp gcc/ada/Makefile
621 %endif
622
623 cd ..
624 %{__make} -C obj-%{_target_platform} bootstrap-lean \
625         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
626         mandir=%{_mandir} \
627         infodir=%{_infodir}
628
629 %if %{!?_without_ada:1}%{?_without_ada:0}
630 %{__make} -C obj-%{_target_platform}/gcc gnatlib gnattools gnatlib-shared \
631         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
632         mandir=%{_mandir} \
633         infodir=%{_infodir}
634
635 # make Gnat Reference Manual
636 %{__make} -C obj-%{_target_platform}/gcc/ada doc
637 %endif
638
639 %install
640 rm -rf $RPM_BUILD_ROOT
641 install -d $RPM_BUILD_ROOT{/lib,%{_datadir},%{_infodir}}
642
643 cd obj-%{_target_platform}
644 PATH=$PATH:/sbin:%{_sbindir}
645
646 %{__make} install \
647         prefix=$RPM_BUILD_ROOT%{_prefix} \
648         mandir=$RPM_BUILD_ROOT%{_mandir} \
649         infodir=$RPM_BUILD_ROOT%{_infodir} \
650         slibdir=$RPM_BUILD_ROOT/lib
651
652 ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
653 echo .so gcc.1 > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
654
655 ln -sf g77 $RPM_BUILD_ROOT%{_bindir}/f77
656 echo .so g77.1 > $RPM_BUILD_ROOT%{_mandir}/man1/f77.1
657
658 (cd $RPM_BUILD_ROOT%{_libdir} ; LIBSTDC=$(ls libstdc++.so.*.*.*) ; \
659  cd $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/ ; \
660  ln -sf ../../../${LIBSTDC} libstdc++.so ; \
661  ln -sf ../../../libstdc++.la libstdc++.la)
662
663 mv $RPM_BUILD_ROOT%{_libdir}/libstdc++.a \
664         $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/
665
666 LIBSTDC=$(ls -d $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/* | sed -e "s#$RPM_BUILD_ROOT##g")
667 mv $RPM_BUILD_ROOT%{_libdir}/libstdc++.la $RPM_BUILD_ROOT%{_libdir}/libstdc++.la.old
668 sed -e "s#^libdir='/usr/lib'#libdir='$LIBSTDC'#g" $RPM_BUILD_ROOT%{_libdir}/libstdc++.la.old \
669  > $RPM_BUILD_ROOT%{_libdir}/libstdc++.la
670
671 %if %{!?_without_ada:1}%{?_without_ada:0}
672 # move ada shared libraries to proper place...
673 mv $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/*-*so.1 \
674         $RPM_BUILD_ROOT%{_libdir}
675 rm -f $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/*.so.1
676 (cd $RPM_BUILD_ROOT%{_libdir} && \
677  ln -s libgnat-*so.1 libgnat.so.1 && \
678  ln -s libgnarl-*so.1 libgnarl.so.1)
679 %endif
680
681 ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp
682
683 cd ..
684
685 %if %{!?_without_ada:1}%{?_without_ada:0}
686 install  obj-%{_target_platform}/gcc/ada/gnat_rm.info* $RPM_BUILD_ROOT%{_infodir}
687 %endif
688
689 %if %{!?_without_java:1}%{?_without_java:0}
690 install -d java-doc
691 cp -f libjava/doc/cni.sgml libjava/READ* java-doc
692 cp -f fastjar/README java-doc/README.fastjar
693 cp -f libffi/README java-doc/README.libffi
694 cp -f libffi/LICENSE java-doc/LICENSE.libffi
695
696 cp -f libobjc/README gcc/objc/README.libobjc
697 %endif
698
699 %find_lang %{name}
700 %find_lang libstdc\+\+
701
702 %clean
703 rm -rf $RPM_BUILD_ROOT
704
705 %post
706 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
707
708 %postun
709 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
710
711 %post g77
712 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
713
714 %postun g77
715 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
716
717 %post java
718 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
719
720 %postun java
721 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
722
723 %post ksi
724 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
725
726 %postun ksi
727 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
728
729 %post -n cpp
730 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
731
732 %postun -n cpp
733 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
734
735 %post   -p /sbin/ldconfig -n libgcc
736 %postun -p /sbin/ldconfig -n libgcc
737 %post   -p /sbin/ldconfig -n libstdc++
738 %postun -p /sbin/ldconfig -n libstdc++
739 %post   -p /sbin/ldconfig -n libobjc
740 %postun -p /sbin/ldconfig -n libobjc
741 %post   -p /sbin/ldconfig -n libg2c
742 %postun -p /sbin/ldconfig -n libg2c
743 %post   -p /sbin/ldconfig -n libgcj
744 %postun -p /sbin/ldconfig -n libgcj
745 %post   -p /sbin/ldconfig -n libgnat
746 %postun -p /sbin/ldconfig -n libgnat
747
748 %files -f %{name}.lang
749 %defattr(644,root,root,755)
750 %doc READ* ChangeLog
751 %dir %{_libdir}/gcc-lib
752 %dir %{_libdir}/gcc-lib/%{_target_cpu}*
753 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*
754 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*/include
755 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-gcc
756 %attr(755,root,root) %{_bindir}/gcc
757 %attr(755,root,root) %{_bindir}/gccbug
758 %attr(755,root,root) %{_bindir}/gcov
759 %attr(755,root,root) %{_bindir}/cc
760
761 %{_mandir}/man1/gcc.1*
762 %{_mandir}/man1/cc.1*
763 %{_mandir}/man1/gcov.1*
764 %{_infodir}/gcc*
765
766 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libgcc.a
767 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libgcc_eh.a
768 %{_libdir}/gcc-lib/%{_target_cpu}*/*/specs
769 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/crt*.o
770 %ifarch ppc
771 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ecrt*.o
772 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ncrt*.o
773 %{_libdir}/gcc-lib/%{_target_cpu}*/*/nof
774 %dir %{_libdir}/nof
775 %endif
776 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1
777 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/collect2
778
779 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/float.h
780 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/iso646.h
781 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/limits.h
782 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stdarg.h
783 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stdbool.h
784 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stddef.h
785 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/syslimits.h
786 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/varargs.h
787 %ifarch %{ix86}
788 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/mmintrin.h
789 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/xmmintrin.h
790 %endif
791 %ifarch ppc
792 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/altivec.h
793 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/ppc-asm.h
794 %endif
795
796 %files -n libgcc
797 %defattr(644,root,root,755)
798 %attr(755,root,root) %{_slibdir}/lib*.so*
799
800 %files c++
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_bindir}/g++
803 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-g++
804 %attr(755,root,root) %{_bindir}/c++
805 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-c++
806 %attr(755,root,root) %{_bindir}/c++filt
807 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1plus
808 %attr(755,root,root) %{_libdir}/libsupc++.la
809 %ifarch ppc
810 %attr(755,root,root) %{_libdir}/nof/libsupc++.la
811 %{_libdir}/nof/libsupc++.a
812 %endif
813 %{_libdir}/libsupc++.a
814 %{_mandir}/man1/g++.1*
815
816 %files -n libstdc++ -f libstdc++.lang
817 %defattr(644,root,root,755)
818 %attr(755,root,root) %{_libdir}/libstdc++.so.*.*.*
819 %ifarch ppc
820 %attr(755,root,root) %{_libdir}/nof/libstdc++.so.*.*.*
821 %endif
822
823 %files -n libstdc++-devel
824 %defattr(644,root,root,755)
825 %doc libstdc++-v3/docs/html
826 %dir %{_includedir}/c++
827 %{_includedir}/c++/%{GCC_VERSION}
828 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/libstdc++.so
829 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/libstdc++.la
830 %attr(755,root,root) %{_libdir}/libstdc++.la
831 %ifarch ppc
832 %attr(755,root,root) %{_libdir}/nof/libstdc++.so
833 %attr(755,root,root) %{_libdir}/nof/libstdc++.la
834 %endif
835
836 %files -n libstdc++-static
837 %defattr(644,root,root,755)
838 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libstdc++.a
839 %ifarch ppc
840 %{_libdir}/nof/libstdc++.a
841 %endif
842
843 %files objc
844 %defattr(644,root,root,755)
845 %doc gcc/objc/READ*
846 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1obj
847 %attr(755,root,root) %{_libdir}/libobjc.so
848 %attr(755,root,root) %{_libdir}/libobjc.la
849 %ifarch ppc
850 %attr(755,root,root) %{_libdir}/nof/libobjc.so
851 %attr(755,root,root) %{_libdir}/nof/libobjc.la
852 %endif
853 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/objc
854
855 %files -n libobjc
856 %defattr(644,root,root,755)
857 %attr(755,root,root) %{_libdir}/libobjc.so.*.*.*
858 %ifarch ppc
859 %attr(755,root,root) %{_libdir}/nof/libobjc.so.*.*.*
860 %endif
861
862 %files -n libobjc-static
863 %defattr(644,root,root,755)
864 %{_libdir}/libobjc.a
865 %ifarch ppc
866 %{_libdir}/nof/libobjc.a
867 %endif
868
869 %files g77
870 %defattr(644,root,root,755)
871 %attr(755,root,root) %{_bindir}/g77
872 %attr(755,root,root) %{_bindir}/f77
873 %{_infodir}/g77*
874 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/f771
875 %{_libdir}/libfrtbegin.a
876 %attr(755,root,root) %{_libdir}/libg2c.la
877 %attr(755,root,root) %{_libdir}/libg2c.so
878 %ifarch ppc
879 %{_libdir}/nof/libfrtbegin.a
880 %attr(755,root,root) %{_libdir}/nof/libg2c.la
881 %attr(755,root,root) %{_libdir}/nof/libg2c.so
882 %endif
883 %{_mandir}/man1/g77.1*
884 %{_mandir}/man1/f77.1*
885 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/g2c.h
886
887 %files -n libg2c
888 %defattr(644,root,root,755)
889 %attr(755,root,root) %{_libdir}/libg2c.so.*.*.*
890 %ifarch ppc
891 %attr(755,root,root) %{_libdir}/nof/libg2c.so.*.*.*
892 %endif
893
894 %files -n libg2c-static
895 %{_libdir}/libg2c.a
896 %ifarch ppc
897 %{_libdir}/nof/libg2c.a
898 %endif
899
900 %if %{!?_without_java:1}%{?_without_java:0}
901 %files java
902 %defattr(644,root,root,755)
903 %doc java-doc/*
904 %attr(755,root,root) %{_bindir}/gcj*
905 %attr(755,root,root) %{_bindir}/gij
906 %attr(755,root,root) %{_bindir}/jcf-dump
907 %attr(755,root,root) %{_bindir}/jv-*
908 %attr(755,root,root) %{_bindir}/rmi*
909 %attr(755,root,root) %{_bindir}/jar
910 %attr(755,root,root) %{_bindir}/grepjar
911 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/jc1
912 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/jvgenmain
913 %{_infodir}/gcj*
914 %{_mandir}/man1/jcf-*
915 %{_mandir}/man1/jv-*
916 %{_mandir}/man1/gij*
917 %{_mandir}/man1/gcj*
918 %{_mandir}/man1/rmi*
919
920 %files -n libgcj
921 %defattr(644,root,root,755)
922 %attr(755,root,root) %{_bindir}/addr2name.awk
923 %attr(755,root,root) %{_libdir}/lib*cj*.so.*
924 %ifarch ppc
925 %attr(755,root,root) %{_libdir}/nof/lib*cj*.so.*
926 %endif
927
928 %files -n libgcj-devel
929 %defattr(644,root,root,755)
930 %{_includedir}/java
931 %{_includedir}/javax
932 %{_includedir}/org
933 %{_includedir}/gcj
934 %{_includedir}/j*.h
935 %{_includedir}/gnu/*
936 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/gcj
937 %{_libdir}/security/*
938 %dir %{_datadir}/java
939 %{_datadir}/java/libgcj*.jar
940 %{_libdir}/lib*cj.spec
941 %attr(755,root,root) %{_libdir}/lib*cj*.la
942 %attr(755,root,root) %{_libdir}/lib*cj*.so
943 %ifarch ppc
944 %{_libdir}/nof/lib*cj.spec
945 %attr(755,root,root) %{_libdir}/nof/lib*cj*.la
946 %attr(755,root,root) %{_libdir}/nof/lib*cj*.so
947 %endif
948
949 %files -n libgcj-static
950 %defattr(644,root,root,755)
951 %{_libdir}/lib*cj*.a
952 %ifarch ppc
953 %{_libdir}/nof/lib*cj*.a
954 %endif
955 %endif
956
957 %if %{!?_without_ada:1}%{?_without_ada:0}
958 %files ada
959 %defattr(644,root,root,755)
960 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/gnat1
961 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adainclude
962 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib
963 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/*.ali
964 %ifnarch ppc
965 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/libgmem.a
966 %endif
967 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/Makefile.adalib
968 %attr(755,root,root) %{_bindir}/gnat*
969 %{_infodir}/gnat*
970 %attr(755,root,root) %{_libdir}/libgnat.so.1
971 %attr(755,root,root) %{_libdir}/libgnarl.so.1
972
973 %files -n libgnat
974 %defattr(644,root,root,755)
975 %attr(755,root,root) %{_libdir}/libgna*-*so.1
976
977 %files -n libgnat-static
978 %defattr(644,root,root,755)
979 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/libgna*.a
980 %endif
981
982 %files ksi
983 %defattr(644,root,root,755)
984 %doc gcc/ksi/README gcc/ksi/NEWS gcc/ksi/t/*.{ksi,c,foo}
985 %{_infodir}/ksi*
986 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ksi1
987
988 %files -n cpp
989 %defattr(644,root,root,755)
990 %attr(755,root,root) %{_slibdir}/cpp
991 %attr(755,root,root) %{_bindir}/cpp
992 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cpp0
993 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/tradcpp0
994 %{_mandir}/man1/cpp.1*
995 %{_infodir}/cpp*
This page took 0.119718 seconds and 2 git commands to generate.