3 # _without_ada - build without ADA support
4 # _without_java - build without Java support
5 # _without_objc - build without objc support
7 %define DASHED_SNAP %{nil}
8 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
9 %define GCC_VERSION 3.3
10 %define KSI_VERSION 1.1.0.1567
12 Summary: GNU C Compiler
13 Summary(pl): Kompilator C GNU
14 Summary(pt_BR): C Compilador GNU (GCC)
16 Version: %{GCC_VERSION}
20 Group: Development/Languages
21 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/%{name}-%{GCC_VERSION}.tar.bz2
22 # Source0-md5: 39147717455d8dba4d43d1b058ea46e2
23 Source1: ftp://ftp.pld.org.pl/people/malekith/ksi/ksi-%{KSI_VERSION}.tar.gz
24 # Source1-md5: 66f07491b44f06928fd95b0e65bb8cd3
25 Source2: http://ep09.kernel.pl/~djrzulf/gcc33/%{name}-non-english-man-pages.tar.bz2
26 # Source2-md5: 4736f3422ddfb808423b745629acc321
27 Patch0: %{name}-info.patch
28 Patch1: %{name}-paths.patch
29 Patch2: %{name}-nolocalefiles.patch
30 Patch3: %{name}-ada-link-new-libgnat.patch
31 Patch4: %{name}-PR10849.patch
32 # -- stolen patches from RH --
33 Patch10: gcc32-ada-link.patch
34 Patch11: gcc32-boehm-gc-libs.patch
35 Patch12: gcc32-bogus-inline.patch
36 Patch13: gcc32-c++-nrv-test.patch
37 Patch14: gcc32-c++-tsubst-asm.patch
38 Patch15: gcc32-debug-pr7241.patch
39 Patch16: gcc32-duplicate-decl.patch
40 Patch17: gcc32-dwarf2-pr6381.patch
41 Patch18: gcc32-dwarf2-pr6436-test.patch
42 Patch19: gcc32-fde-merge-compat.patch
43 Patch20: gcc32-i386-memtest-test.patch
44 Patch21: gcc32-inline-label.patch
45 Patch22: gcc32-java-no-rpath.patch
46 Patch23: gcc32-test-rh65771.patch
47 Patch24: gcc32-test-rotate.patch
48 Patch25: %{name}-unwind.patch
49 BuildRequires: autoconf
50 BuildRequires: binutils >= 2.14
52 BuildRequires: fileutils >= 4.0.41
54 %{!?_without_ada:BuildRequires: gcc-ada}
55 BuildRequires: glibc-devel >= 2.2.5-20
56 BuildRequires: perl-devel
57 BuildRequires: texinfo >= 4.1
58 BuildRequires: zlib-devel
59 BuildRequires: gettext-devel
60 Requires: binutils >= 2.14
61 Requires: cpp = %{GCC_VERSION}
62 Requires: libgcc = %{GCC_VERSION}
63 Conflicts: glibc-devel < 2.2.5-20
64 URL: http://gcc.gnu.org/
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 A compiler aimed at integrating all the optimizations and features
71 necessary for a high-performance and stable development environment.
74 Kompilator, posiadaj±cy du¿e mo¿liwo¶ci optymalizacyjne niezbêdne do
75 wyprodukowania szybkiego i stablinego kodu wynikowego.
78 Este pacote adiciona infraestrutura básica e suporte a linguagem C
79 ao Gnu Compiler Collection.
82 Summary: Shared gcc library
83 Summary(pl): Biblioteka gcc
84 Summary(pt_BR): Biblioteca runtime para o GCC
86 Version: %{GCC_VERSION}
89 %description -n libgcc
92 %description -n libgcc -l pl
93 Biblioteka dynamiczna gcc.
95 %description -n libgcc -l pt_BR
96 Biblioteca runtime para o GCC.
99 Summary: C++ support for gcc
100 Summary(pl): Obs³uga C++ dla gcc
101 Summary(pt_BR): Suporte C++ para o gcc
102 Group: Development/Languages
105 Requires: gcc = %{GCC_VERSION}
108 This package adds C++ support to the GNU C compiler. It includes
109 support for most of the current C++ specification, including templates
110 and exception handling. It does not include a standard C++ library,
111 which is available separately.
113 %description c++ -l de
114 Dieses Paket enthält die C++-Unterstützung für den GNU-C-Compiler. Es
115 unterstützt die aktuelle C++-Spezifikation, inkl. Templates und
116 Ausnahmeverarbeitung. Eine C++-Standard-Library ist nicht enthalten -
117 sie ist getrennt erhältlich.
119 %description c++ -l fr
120 Ce package ajoute un support C++ au compilateur c GNU. Il comprend un
121 support pour la plupart des spécifications actuelles de C++, dont les
122 modéles et la gestion des exceptions. Il ne comprend pas une
123 bibliothéque C++ standard, qui est disponible séparément.
125 %description c++ -l pl
126 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc. Ma wsparcie dla
127 du¿ej ilo¶ci obecnych specyfikacji C++, nie zawiera natomiast
128 standardowych bibliotek C++, które s± w oddzielnym pakiecie.
130 %description c++ -l pt_BR
131 Este pacote adiciona suporte C++ para o gcc.
133 %description c++ -l tr
134 Bu paket, GNU C derleyicisine C++ desteði ekler. 'Template'ler ve
135 aykýrý durum iþleme gibi çoðu güncel C++ tanýmlarýna uyar. Standart
136 C++ kitaplýðý bu pakette yer almaz.
139 Summary: Objective C support for gcc
140 Summary(de): Objektive C-Unterstützung für gcc
141 Summary(fr): Gestion d'Objective C pour gcc
142 Summary(pl): Obs³uga obiektowego C dla kompilatora gcc
143 Summary(tr): gcc için Objective C desteði
144 Group: Development/Languages
147 Requires: libobjc = %{GCC_VERSION}
148 Requires: gcc = %{GCC_VERSION}
151 This package adds Objective C support to the GNU C compiler. Objective
152 C is a object oriented derivative of the C language, mainly used on
153 systems running NeXTSTEP. This package does not include the standard
154 objective C object library.
156 %description objc -l de
157 Dieses Paket ergänzt den GNU-C-Compiler durch Objective-C-Support.
158 Objective C ist ein objektorientiertes Derivat von C, das zur
159 Hauptsache auf Systemen mit NeXTSTEP zum Einsatz kommt. Die
160 Standard-Objective-C-Objekt-Library ist nicht Teil des Pakets.
162 %description objc -l fr
163 Ce package ajoute un support Objective C au compilateur C GNU.
164 L'Objective C est un langage orienté objetdérivé du langage C,
165 principalement utilisé sur les systèmes NeXTSTEP. Ce package n'inclue
166 pas la bibliothéque Objective C standard.
168 %description objc -l pl
169 Ten pakiet dodaje obs³ugê obiektowego C do kompilatora gcc. Obiektowe
170 C (objc) jest zorientowan± obiektowo pochodn± jêzyka C, u¿ywan±
171 g³ównie w systemach u¿ywaj±cych NeXTSTEP. W pakiecie nie ma
172 standardowej biblioteki objc (która znajduje siê w osobnym pakiecie).
174 %description objc -l tr
175 Bu paket, GNU C derleyicisine Objective C desteði ekler. Objective C,
176 C dilinin nesne yönelik bir türevidir ve NeXTSTEP altýnda çalýþan
177 sistemlerde yaygýn olarak kullanýlýr. Standart Objective C nesne
178 kitaplýðý bu pakette yer almaz.
181 Summary: Objective C Libraries
182 Summary(pl): Biblioteki Obiektowego C
184 Version: %{GCC_VERSION}
187 %description -n libobjc
188 Objective C Libraries.
190 %description -n libobjc -l pl
191 Biblioteki Obiektowego C.
193 %package -n libobjc-static
194 Summary: Static Objective C Libraries
195 Summary(pl): Statyczne Biblioteki Obiektowego C
196 Group: Development/Libraries
197 Version: %{GCC_VERSION}
198 Requires: libobjc = %{GCC_VERSION}
200 %description -n libobjc-static
201 Static Objective C Libraries.
203 %description -n libobjc-static -l pl
204 Statyczne biblioteki Obiektowego C.
207 Summary: Fortran 77 support for gcc
208 Summary(pl): Obs³uga Fortranu 77 dla gcc
209 Summary(pt_BR): Suporte Fortran 77 para o GCC
210 Group: Development/Languages/Fortran
211 Version: %{GCC_VERSION}
213 Requires: libg2c = %{GCC_VERSION}
216 This apckage adds support for compiling Fortran 77 programs with the
219 %description g77 -l pl
220 Ten pakiet dodaje obs³ugê Fortranu 77 do kompilatora gcc. Jest
221 potrzebny do kompilowania programów pisanych w jêzyku Fortran 77.
223 %description g77 -l pt_BR
224 Suporte Fortran 77 para o GCC.
227 Summary: Fortran 77 Libraries
228 Summary(pl): Biblioteki Fortranu 77
230 Version: %{GCC_VERSION}
232 %description -n libg2c
233 Fortran 77 Libraries.
235 %description -n libg2c -l pl
236 Biblioteki Fortranu 77.
238 %package -n libg2c-static
239 Summary: Static Fortran 77 Libraries
240 Summary(pl): Statyczne Biblioteki Fortranu 77
241 Group: Development/Libraries
242 Version: %{GCC_VERSION}
243 Requires: libg2c = %{GCC_VERSION}
245 %description -n libg2c-static
246 Static Fortran 77 Libraries.
248 %description -n libg2c-static -l pl
249 Statyczne biblioteki Fortranu 77.
252 Summary: Java support for gcc
253 Summary(pl): Obs³uga Javy dla gcc
254 Group: Development/Languages/Java
255 Version: %{GCC_VERSION}
256 Requires: %{name} = %{version}
257 Requires: libgcj >= 3.0.0
258 Requires: libgcj-devel >= 3.0.0
259 Requires: java-shared
260 Provides: gcj = %{epoch}:%{GCC_VERSION}-%{release}
263 This package adds experimental support for compiling Java(tm) programs
264 and bytecode into native code. To use this you will also need the
267 %description -l pl java
268 Wsparcie dla kompilowania programów Java(tm) zrówno do bajt-kodu jak i
269 do natywnego kodu. Dodatkowo wymagany jest pakiet libgcj, aby mo¿na
270 by³o przeprowadziæ kompilacjê.
273 Summary: Shared java tools
274 Summary(pl): Wspó³dzielone narzêdzia javy
275 Group: Development/Languages/Java
276 Version: %{GCC_VERSION}
277 Provides: jar = %{epoch}:%{GCC_VERSION}-%{release}
278 Provides: java-shared
280 Obsoletes: java-shared
283 %description java-tools
284 This package contains tools that are common for every Java(tm) implementation,
287 %description java-tools -l pl
288 Pakiet ten zawiera narzêdzia wspólne dla ka¿dej implementacji Javy(tm), takie
292 Summary: Java Class Libraries
293 Summary(pl): Biblioteki Klas Javy
295 Version: %{GCC_VERSION}
299 %description -n libgcj
300 Java Class Libraries.
302 %description -n libgcj -l pl
303 Biblioteki Klas Javy.
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 Requires: libgcj = %{GCC_VERSION}
311 Requires: %{name}-java
312 Obsoletes: libgcj3-devel
314 %description -n libgcj-devel
315 Development files for Java Class Libraries.
317 %description -n libgcj-devel -l pl
318 Pliki nag³ówkowe dla Bibliotek Klas Javy.
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 Requires: libstdc++-devel = %{GCC_VERSION}
326 Requires: libgcj-devel = %{GCC_VERSION}
328 %description -n libgcj-static
329 Static Java Class Libraries.
331 %description -n libgcj-static -l pl
332 Statyczne Biblioteki Klas Javy.
334 %package -n libstdc++
335 Summary: GNU c++ library
336 Summary(pl): Biblioteki GNU C++
337 Summary(pt_BR): Biblioteca C++ GNU
339 Version: %{GCC_VERSION}
341 Obsoletes: libstdc++3
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.
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.
353 %description -n libstdc++ -l es
354 Este es el soporte de las bibliotecas padrón del C++, junto con
355 herramientas GNU adicionales. El paquete incluye las bibliotecas
356 compartidas necesarias para ejecutar aplicaciones C++.
358 %description -n libstdc++ -l fr
359 Ceci est l'implémentation GNU des librairies C++ standard, ainsi que
360 des outils GNU supplémentaires. Ce package comprend les librairies
361 partagées nécessaires à l'exécution d'application C++.
363 %description -n libstdc++ -l pl
364 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
365 bibliotek C++. Znajduj± siê w nim biblioteki dynamiczne niezbêdne do
366 uruchomienia aplikacji napisanych w C++.
368 %description -n libstdc++ -l pt_BR
369 Este pacote é uma implementação da biblioteca padrão C++ v3, um
370 subconjunto do padrão ISO 14882.
372 %description -n libstdc++ -l tr
373 Bu paket, standart C++ kitaplýklarýnýn GNU gerçeklemesidir ve C++
374 uygulamalarýnýn koþturulmasý için gerekli kitaplýklarý içerir.
376 %package -n libstdc++-devel
377 Summary: Header files and documentatino for C++ development
378 Summary(de): Header-Dateien zur Entwicklung mit C++
379 Summary(fr): Fichiers d'en-tête et biblitothèques pour développer en C++
380 Summary(pl): Pliki nag³ówkowe i dokumentacja do biblioteki standardowej C++
381 Summary(pt_BR): Arquivos de inclusão e bibliotecas para o desenvolvimento em C++
382 Summary(tr): C++ ile program geliþtirmek için gerekli dosyalar
383 Group: Development/Libraries
384 Version: %{GCC_VERSION}
385 Requires: libstdc++ = %{GCC_VERSION}
386 Requires: %{name}-c++ = %{GCC_VERSION}
387 Obsoletes: libg++-devel
388 Obsoletes: libstdc++3-devel
390 %description -n libstdc++-devel
391 This is the GNU implementation of the standard C++ libraries. This
392 package includes the header files needed for C++ development and
393 library documentation.
395 %description -n libstdc++-devel -l es
396 Este es el soporte de las bibliotecas padrón del lenguaje C++. Este paquete
397 incluye los archivos de inclusión y bibliotecas necesarios para desarrollo de
398 programas en lenguaje C++.
400 %description -n libstdc++-devel -l pl
401 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
402 bibliotek C++. Znajduj± siê w nim pliki nag³ówkowe wykorzystywane przy
403 programowaniu w jêzyku C++ oraz dokumentacja biblioteki standardowej.
405 %description -n libstdc++-devel -l pt_BR
406 Este pacote inclui os arquivos de inclusão e bibliotecas necessárias para
407 desenvolvimento de programas C++.
409 %package -n libstdc++-static
410 Summary: Static C++ standard library
411 Summary(pl): Statyczna biblioteka standardowa C++
412 Group: Development/Libraries
413 Version: %{GCC_VERSION}
414 Requires: libstdc++-devel = %{GCC_VERSION}
416 %description -n libstdc++-static
417 Static C++ standard library.
419 %description -n libstdc++-static -l pl
420 Statycza biblioteka standardowa C++.
423 Summary: Foreign Function Interface library
424 Summary(pl): Biblioteka zewnêtrznych wywo³añ funkcji
426 Version: %{GCC_VERSION}
428 %description -n libffi
429 The libffi library provides a portable, high level programming
430 interface to various calling conventions. This allows a programmer to
431 call any function specified by a call interface description at run
434 %description -n libffi -l pl
435 Biblioteka libffi dostarcza przno¶nego, wysokopoziomowego miêdzymordzia
436 do ró¿nych konwencji wywo³añ funkcji. Pozwala to programi¶cie wywo³ywaæ
437 dowolne funkcje podaj±c konwencjê wywo³ania w czasie wykonania.
439 %package -n libffi-devel
440 Summary: Development files for Foreign Function Interface library
441 Summary(pl): Pliki nag³ówkowe dla libffi
442 Group: Development/Libraries
443 Version: %{GCC_VERSION}
444 Requires: libffi = %{GCC_VERSION}
446 %description -n libffi-devel
447 Development files for Foreign Function Interface library.
449 %description -n libffi-devel -l pl
450 Pliki nag³ówkowe dla libffi.
452 %package -n libffi-static
453 Summary: Static Foreign Function Interface library
454 Summary(pl): Statyczna biblioteka libffi
455 Group: Development/Libraries
456 Version: %{GCC_VERSION}
457 Requires: libffi-devel = %{GCC_VERSION}
459 %description -n libffi-static
460 Static Foreign Function Interface library.
462 %description -n libffi-static -l pl
463 Statyczna biblioteka libffi.
466 Summary: Ada support for gcc
467 Summary(pl): Obs³uga Ady do gcc
468 Group: Development/Languages
469 Version: %{GCC_VERSION}
470 Requires: libgnat = %{GCC_VERSION}
471 Requires: gcc = %{GCC_VERSION}
473 Obsoletes: gnat-devel
476 This package adds experimental support for compiling Ada programs.
478 %description -l pl ada
479 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
483 Summary: Ada standard libraries
484 Summary(pl): Biblioteki standardowe dla Ady
486 Version: %{GCC_VERSION}
490 %description -n libgnat
491 This package contains shared libraries needed to run programs written
494 %description -n libgnat -l pl
495 Ten pakiet zawiera biblioteki potrzebne do uruchamiania programów napisanych
498 %package -n libgnat-static
499 Summary: Static Ada standard libraries
500 Summary(pl): Statyczne biblioteki standardowe dla Ady
502 Version: %{GCC_VERSION}
503 Obsoletes: gnat-static
505 %description -n libgnat-static
506 This package contains static libraries for programs written in Ada.
508 %description -n libgnat-static -l pl
509 Ten pakiet zawiera biblioteki statyczne dla programów napisanych w
513 Summary: Ksi support for gcc
514 Summary(pl): Obs³uga Ksi dla gcc
515 Version: %{GCC_VERSION}.%{KSI_VERSION}
516 Group: Development/Languages
517 Requires: gcc = %{GCC_VERSION}
520 This package adds experimental support for compiling Ksi programs
521 into native code. You proabably don't need it, unless your are going
522 to develop a compiler using Ksi as intermediate representation or
523 you are using such compiler (like Gont).
525 %description ksi -l pl
526 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
527 w Ksi do kodu maszynowego. Prawdopodobnie nie potrzebujesz go, chyba
528 ¿e zamierzasz pisaæ kompilator u¿ywaj±cy Ksi jako reprezentacji
529 po¶rednicz±cej, lub u¿ywasz takiego kompilatora (jak Gont).
532 Summary: The C Pre Processor
533 Summary(pl): Preprocesor C
534 Summary(pt_BR): Preprocessador para a linguagem C
535 Group: Development/Languages
536 Version: %{GCC_VERSION}
541 The C preprocessor is a "macro processor" that is used automatically
542 by the C compiler to transform your program before actual compilation.
543 It is called a macro processor because it allows you to define
544 "macros", which are brief abbreviations for longer constructs.
546 The C preprocessor provides four separate facilities that you can use
549 - Inclusion of header files. These are files of declarations that can
550 be substituted into your program.
551 - Macro expansion. You can define "macros", which are abbreviations
552 for arbitrary fragments of C code, and then the C preprocessor will
553 replace the macros with their definitions throughout the program.
554 - Conditional compilation. Using special preprocessing directives, you
555 can include or exclude parts of the program according to various
557 - Line control. If you use a program to combine or rearrange source
558 files into an intermediate file which is then compiled, you can use
559 line control to inform the compiler of where each source line
560 originally came from.
562 %description -n cpp -l es
563 Um preprocessador para a linguagem C.
565 %description -n cpp -l pl
566 Przeprocesor C jest "makro procesorem" który jest automatycznie
567 u¿ywany przez kompilator C do obróbki kompilowanego programu przed
568 w³a¶ciw± kompilacj±. Jest on nazywany makroprocesorem, poniewa¿
569 umo¿liwia definiowanie i rozwijanie makr umo¿liwiaj±cych skracanie
570 d³ugich konstrukcji w jêzyku C.
572 Preprocesor C umo¿liwia wykonywanie czterech ró¿nych typów operacji:
574 - Do³±czanie plików (np. nag³ówkowych). Wstawia pliki w miejscu
575 deklaracji polecenia do³±czenia innego pliku.
576 - Rozwijanie makr. Mo¿na definiowaæ "makra" nadaj±c im identyfikatory,
577 których pó¼niejsze u¿ycie powoduje podczas rozwijania podmienienie
578 indentyfikatora deklarowan± wcze¶niej warto¶ci±.
579 - Kompilacja warunkowa. W zale¿no¶ci od obecno¶ci symboli i dyrektyw w
580 ¶rodowisku preprocesora s± w³±czane warunkowo, b±d¼ nie, pewne
581 fragmenty obrabianego strumienia tekstów.
582 - Kontrola linii ¼ród³a. Niezale¿nie od tego jakim przeobra¿eniom
583 podlega wynikowy strumieñ danych w wyniku rozwijania makr i do³±czania
584 s± zapamiêtywane informacje o tym, której linii pliku ¼ród³owego
585 odpowiada fragment pliku wynikowego.
587 %description -n cpp -l pt_BR
588 O preprocessador C é um "processador de macros", que é utilizado pelo
589 compilador C para fazer algumas modificações no seu programa, antes da
590 compilação em si. Ele é chamado de "processador de macros" porque
591 permite a você definir "macros", que são abreviações para construções
594 O preprocessador C fornece quatro funcionalidades básicas: inclusão de
595 arquivos de cabeçalho; expansão de macros; compilação condicional;
596 e controle da numeração das linhas do programa.
599 %setup -q -a1 -n %{name}-%{GCC_VERSION}
600 mv ksi-%{KSI_VERSION} gcc/ksi
628 # because we distribute modified version of gcc...
629 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
630 perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld.org.pl/>";@' gcc/version.c
633 # cd gcc && autoconf; cd ..
634 # autoconf is not needed!
635 rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform}
637 CFLAGS="%{rpmcflags}" \
638 CXXFLAGS="%{rpmcflags}" \
639 TEXCONFIG=false ../configure \
640 --prefix=%{_prefix} \
641 --infodir=%{_infodir} \
642 --mandir=%{_mandir} \
644 --enable-threads=posix \
645 --enable-__cxa_atexit \
646 --enable-languages="c,c++,f77%{!?_without_objc:,objc}%{!?_without_ada:,ada}%{!?_without_java:,java},ksi" \
654 --with-slibdir=%{_slibdir} \
658 PATH=$PATH:/sbin:%{_sbindir}
661 %{__make} -C obj-%{_target_platform} bootstrap-lean \
662 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
666 %if 0%{!?_without_ada:1}
667 %{__make} -C obj-%{_target_platform}/gcc gnatlib gnattools gnatlib-shared \
668 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
674 rm -rf $RPM_BUILD_ROOT
675 install -d $RPM_BUILD_ROOT{/lib,%{_datadir},%{_infodir}}
677 cd obj-%{_target_platform}
678 PATH=$PATH:/sbin:%{_sbindir}
681 DESTDIR=$RPM_BUILD_ROOT
683 ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
684 echo ".so gcc.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
686 ln -sf g77 $RPM_BUILD_ROOT%{_bindir}/f77
687 echo ".so g77.1" > $RPM_BUILD_ROOT%{_mandir}/man1/f77.1
689 %if 0%{!?_without_ada:1}
690 # move ada shared libraries to proper place...
691 mv $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/*.so.1 \
692 $RPM_BUILD_ROOT%{_libdir}/
693 # check if symlink to be made is valid
694 test -f $RPM_BUILD_ROOT%{_libdir}/libgnat-3.15.so.1
695 ln -sf libgnat-3.15.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnat-3.15.so
696 ln -sf libgnarl-3.15.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnarl-3.15.so
697 ln -sf libgnat-3.15.so $RPM_BUILD_ROOT%{_libdir}/libgnat.so
698 ln -sf libgnarl-3.15.so $RPM_BUILD_ROOT%{_libdir}/libgnarl.so
701 ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp
705 %if %{!?_without_java:1}%{?_without_java:0}
707 cp -f libjava/doc/cni.sgml libjava/READ* java-doc
708 cp -f fastjar/README java-doc/README.fastjar
709 cp -f libffi/README java-doc/README.libffi
710 cp -f libffi/LICENSE java-doc/LICENSE.libffi
713 %if %{!?_without_objc:1}0
714 cp -f libobjc/README gcc/objc/README.libobjc
717 # avoid -L poisoning in *.la - there should be only -L%{_libdir}/gcc-lib/*/%{version}
718 for f in libstdc++.la libsupc++.la %{!?_without_java:libgcj.la} ; do
719 perl -pi -e 's@-L[^ ]*[acs.] @@g' $RPM_BUILD_ROOT%{_libdir}/$f
721 # normalize libdir, to avoid propagation of unnecessary RPATHs by libtool
722 for f in libstdc++.la libsupc++.la libg2c.la \
723 %{!?_without_java:libgcj.la lib-org-w3c-dom.la lib-org-xml-sax.la libffi.la} \
724 %{!?_without_objc:libobjc.la}; do
725 perl -pi -e "s@^libdir='.*@libdir='/usr/lib'@" $RPM_BUILD_ROOT%{_libdir}/$f
728 bzip2 -dc %{SOURCE2} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
729 mv -f $RPM_BUILD_ROOT%{_mandir}/ja/man1/{cccp,cpp}.1
731 # include/ contains install-tools/include/* and headers that were fixed up
732 # by fixincludes, we don't want former
733 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/)
735 # we have to save these however
736 mv -f $gccdir/include/{%{!?_without_objc:objc,}g2c.h,syslimits.h%{!?_without_java:,gcj}} $gccdir/tmp
737 rm -rf $gccdir/include
738 mv -f $gccdir/tmp $gccdir/include
739 cp $gccdir/install-tools/include/*.h $gccdir/include
740 # but we don't want anything more from install-tools
741 rm -rf $gccdir/install-tools/
744 %find_lang libstdc\+\+
747 rm -rf $RPM_BUILD_ROOT
750 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
753 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
756 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
759 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
762 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
765 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
768 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
771 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
774 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
777 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
779 %post -p /sbin/ldconfig -n libgcc
780 %postun -p /sbin/ldconfig -n libgcc
781 %post -p /sbin/ldconfig -n libstdc++
782 %postun -p /sbin/ldconfig -n libstdc++
783 %post -p /sbin/ldconfig -n libobjc
784 %postun -p /sbin/ldconfig -n libobjc
785 %post -p /sbin/ldconfig -n libg2c
786 %postun -p /sbin/ldconfig -n libg2c
787 %post -p /sbin/ldconfig -n libgcj
788 %postun -p /sbin/ldconfig -n libgcj
789 %post -p /sbin/ldconfig -n libgnat
790 %postun -p /sbin/ldconfig -n libgnat
791 %post -p /sbin/ldconfig -n libffi
792 %postun -p /sbin/ldconfig -n libffi
794 %files -f %{name}.lang
795 %defattr(644,root,root,755)
797 %dir %{_libdir}/gcc-lib
798 %dir %{_libdir}/gcc-lib/%{_target_cpu}*
799 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*
800 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*/include
801 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-gcc
802 %attr(755,root,root) %{_bindir}/gcc
803 %attr(755,root,root) %{_bindir}/gccbug
804 %attr(755,root,root) %{_bindir}/gcov
805 %attr(755,root,root) %{_bindir}/cc
807 %{_mandir}/man1/gcc.1*
808 %{_mandir}/man1/cc.1*
809 %{_mandir}/man1/gcov.1*
810 %lang(fr) %{_mandir}/fr/man1/gcc.1*
811 %lang(ja) %{_mandir}/ja/man1/gcc.1*
814 %attr(755,root,root) %{_slibdir}/lib*.so
815 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libgcc.a
816 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libgcc_eh.a
817 %{_libdir}/gcc-lib/%{_target_cpu}*/*/specs
818 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/crt*.o
820 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ecrt*.o
821 %attr(644,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ncrt*.o
822 %{_libdir}/gcc-lib/%{_target_cpu}*/*/nof
825 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1
826 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/collect2
828 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/*.h
829 %exclude %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/g2c.h
832 %defattr(644,root,root,755)
833 %attr(755,root,root) %{_slibdir}/lib*.so.*
836 %defattr(644,root,root,755)
837 %attr(755,root,root) %{_bindir}/g++
838 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-g++
839 %attr(755,root,root) %{_bindir}/c++
840 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-c++
841 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1plus
842 %{_libdir}/libsupc++.la
844 %{_libdir}/nof/libsupc++.la
845 %{_libdir}/nof/libsupc++.a
847 %{_libdir}/libsupc++.a
848 %{_mandir}/man1/g++.1*
849 %lang(ja) %{_mandir}/ja/man1/g++.1*
851 %files -n libstdc++ -f libstdc++.lang
852 %defattr(644,root,root,755)
853 %attr(755,root,root) %{_libdir}/libstdc++.so.*.*.*
855 %attr(755,root,root) %{_libdir}/nof/libstdc++.so.*.*.*
858 %files -n libstdc++-devel
859 %defattr(644,root,root,755)
860 %doc libstdc++-v3/docs/html
861 %dir %{_includedir}/c++
862 %{_includedir}/c++/%{GCC_VERSION}
863 %attr(755,root,root) %{_libdir}/libstdc++.so
864 %{_libdir}/libstdc++.la
866 %attr(755,root,root) %{_libdir}/nof/libstdc++.so
867 %{_libdir}/nof/libstdc++.la
870 %files -n libstdc++-static
871 %defattr(644,root,root,755)
872 %{_libdir}/libstdc++.a
874 %{_libdir}/nof/libstdc++.a
877 %if %{!?_without_objc:1}0
879 %defattr(644,root,root,755)
881 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1obj
882 %attr(755,root,root) %{_libdir}/libobjc.so
883 %{_libdir}/libobjc.la
885 %attr(755,root,root) %{_libdir}/nof/libobjc.so
886 %{_libdir}/nof/libobjc.la
888 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/objc
891 %defattr(644,root,root,755)
892 %attr(755,root,root) %{_libdir}/libobjc.so.*.*.*
894 %attr(755,root,root) %{_libdir}/nof/libobjc.so.*.*.*
897 %files -n libobjc-static
898 %defattr(644,root,root,755)
901 %{_libdir}/nof/libobjc.a
906 %defattr(644,root,root,755)
907 %attr(755,root,root) %{_bindir}/g77
908 %attr(755,root,root) %{_bindir}/f77
910 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/f771
911 %{_libdir}/libfrtbegin.a
913 %attr(755,root,root) %{_libdir}/libg2c.so
915 %{_libdir}/nof/libfrtbegin.a
916 %{_libdir}/nof/libg2c.la
917 %attr(755,root,root) %{_libdir}/nof/libg2c.so
919 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/g2c.h
920 %{_mandir}/man1/g77.1*
921 %{_mandir}/man1/f77.1*
922 %lang(ja) %{_mandir}/ja/man1/g77.1*
923 %lang(ja) %{_mandir}/ja/man1/f77.1*
926 %defattr(644,root,root,755)
927 %attr(755,root,root) %{_libdir}/libg2c.so.*.*.*
929 %attr(755,root,root) %{_libdir}/nof/libg2c.so.*.*.*
932 %files -n libg2c-static
933 %defattr(644,root,root,755)
936 %{_libdir}/nof/libg2c.a
939 %if %{!?_without_java:1}%{?_without_java:0}
941 %defattr(644,root,root,755)
943 %attr(755,root,root) %{_bindir}/gcj*
944 %attr(755,root,root) %{_bindir}/gij
945 %attr(755,root,root) %{_bindir}/jcf-dump
946 %attr(755,root,root) %{_bindir}/jv-*
947 %attr(755,root,root) %{_bindir}/grepjar
948 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-gcj
949 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/jc1
950 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/jvgenmain
952 %{_mandir}/man1/jcf-*
956 %{_mandir}/man1/grepjar*
959 %defattr(644,root,root,755)
960 %attr(755,root,root) %{_bindir}/rmi*
961 %attr(755,root,root) %{_bindir}/jar
967 %defattr(644,root,root,755)
968 %attr(755,root,root) %{_bindir}/addr2name.awk
969 %attr(755,root,root) %{_libdir}/lib*cj*.so.*.*.*
970 %attr(755,root,root) %{_libdir}/lib-org*.so.*.*.*
972 %attr(755,root,root) %{_libdir}/nof/lib*cj*.so.*
975 %files -n libgcj-devel
976 %defattr(644,root,root,755)
983 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/gcj
984 %dir %{_libdir}/security
985 %{_libdir}/security/*
986 %dir %{_datadir}/java
987 %{_datadir}/java/libgcj*.jar
988 %{_libdir}/lib*cj.spec
989 %{_libdir}/lib*cj*.la
990 %attr(755,root,root) %{_libdir}/lib*cj*.so
991 %attr(755,root,root) %{_libdir}/lib-org-*.so
992 %{_libdir}/lib-org-*.la
994 %{_libdir}/nof/lib*cj*.la
995 %attr(755,root,root) %{_libdir}/nof/lib*cj*.so
998 %files -n libgcj-static
999 %defattr(644,root,root,755)
1000 %{_libdir}/lib*cj*.a
1001 %{_libdir}/lib-org-*.a
1003 %{_libdir}/nof/lib*cj*.a
1007 %defattr(644,root,root,755)
1008 %attr(755,root,root) %{_libdir}/libffi-*.so
1010 %files -n libffi-devel
1011 %defattr(644,root,root,755)
1012 %attr(755,root,root) %{_libdir}/libffi.so
1013 %{_libdir}/libffi.la
1016 %files -n libffi-static
1017 %defattr(644,root,root,755)
1021 %if 0%{!?_without_ada:1}
1023 %defattr(644,root,root,755)
1024 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/gnat1
1025 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adainclude
1026 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib
1027 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/*.ali
1029 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/libgmem.a
1031 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/Makefile.adalib
1032 %attr(755,root,root) %{_bindir}/gnat*
1034 %attr(755,root,root) %{_libdir}/libgnat*.so
1035 %attr(755,root,root) %{_libdir}/libgnarl*.so
1038 %defattr(644,root,root,755)
1039 %attr(755,root,root) %{_libdir}/libgna*.so.1
1041 %files -n libgnat-static
1042 %defattr(644,root,root,755)
1043 %{_libdir}/gcc-lib/%{_target_cpu}*/*/adalib/libgna*.a
1047 %defattr(644,root,root,755)
1048 %doc gcc/ksi/README gcc/ksi/NEWS gcc/ksi/t/*.{ksi,c,foo}
1050 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/ksi1
1053 %defattr(644,root,root,755)
1054 %attr(755,root,root) %{_slibdir}/cpp
1055 %attr(755,root,root) %{_bindir}/cpp
1056 %{_mandir}/man1/cpp.1*
1057 %lang(ja) %{_mandir}/ja/man1/cpp.1*