3 # _with_ada - build with 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 # -- stolen patches from RH --
32 Patch10: gcc32-ada-link.patch
33 Patch11: gcc32-boehm-gc-libs.patch
34 Patch12: gcc32-bogus-inline.patch
35 Patch13: gcc32-c++-nrv-test.patch
36 Patch14: gcc32-c++-tsubst-asm.patch
37 Patch15: gcc32-debug-pr7241.patch
38 Patch16: gcc32-duplicate-decl.patch
39 Patch17: gcc32-dwarf2-pr6381.patch
40 Patch18: gcc32-dwarf2-pr6436-test.patch
41 Patch19: gcc32-fde-merge-compat.patch
42 Patch20: gcc32-i386-memtest-test.patch
43 Patch21: gcc32-inline-label.patch
44 Patch22: gcc32-java-no-rpath.patch
45 Patch23: gcc32-test-rh65771.patch
46 Patch24: gcc32-test-rotate.patch
47 BuildRequires: autoconf
49 BuildRequires: fileutils >= 4.0.41
51 %{?_with_ada:BuildRequires: gcc-ada}
52 BuildRequires: glibc-devel >= 2.2.5-20
53 BuildRequires: perl-devel
54 BuildRequires: texinfo >= 4.1
55 BuildRequires: zlib-devel
56 BuildRequires: gettext-devel
57 Requires: binutils >= 2.12.90.0.4
58 Requires: cpp = %{GCC_VERSION}
59 Requires: libgcc = %{GCC_VERSION}
60 Conflicts: glibc-devel < 2.2.5-20
61 URL: http://gcc.gnu.org/
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 A compiler aimed at integrating all the optimizations and features
68 necessary for a high-performance and stable development environment.
71 Kompilator, posiadaj±cy du¿e mo¿liwo¶ci optymalizacyjne niezbêdne do
72 wyprodukowania szybkiego i stablinego kodu wynikowego.
75 Este pacote adiciona infraestrutura básica e suporte a linguagem C
76 ao Gnu Compiler Collection.
79 Summary: Shared gcc library
80 Summary(pl): Biblioteka gcc
81 Summary(pt_BR): Biblioteca runtime para o GCC
83 Version: %{GCC_VERSION}
86 %description -n libgcc
89 %description -n libgcc -l pl
90 Biblioteka dynamiczna gcc.
92 %description -n libgcc -l pt_BR
93 Biblioteca runtime para o GCC.
96 Summary: C++ support for gcc
97 Summary(pl): Obs³uga C++ dla gcc
98 Summary(pt_BR): Suporte C++ para o gcc
99 Group: Development/Languages
102 Requires: gcc = %{GCC_VERSION}
105 This package adds C++ support to the GNU C compiler. It includes
106 support for most of the current C++ specification, including templates
107 and exception handling. It does not include a standard C++ library,
108 which is available separately.
110 %description c++ -l de
111 Dieses Paket enthält die C++-Unterstützung für den GNU-C-Compiler. Es
112 unterstützt die aktuelle C++-Spezifikation, inkl. Templates und
113 Ausnahmeverarbeitung. Eine C++-Standard-Library ist nicht enthalten -
114 sie ist getrennt erhältlich.
116 %description c++ -l fr
117 Ce package ajoute un support C++ au compilateur c GNU. Il comprend un
118 support pour la plupart des spécifications actuelles de C++, dont les
119 modéles et la gestion des exceptions. Il ne comprend pas une
120 bibliothéque C++ standard, qui est disponible séparément.
122 %description c++ -l pl
123 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc. Ma wsparcie dla
124 du¿ej ilo¶ci obecnych specyfikacji C++, nie zawiera natomiast
125 standardowych bibliotek C++, które s± w oddzielnym pakiecie.
127 %description c++ -l pt_BR
128 Este pacote adiciona suporte C++ para o gcc.
130 %description c++ -l tr
131 Bu paket, GNU C derleyicisine C++ desteði ekler. 'Template'ler ve
132 aykýrý durum iþleme gibi çoðu güncel C++ tanýmlarýna uyar. Standart
133 C++ kitaplýðý bu pakette yer almaz.
136 Summary: Objective C support for gcc
137 Summary(de): Objektive C-Unterstützung für gcc
138 Summary(fr): Gestion d'Objective C pour gcc
139 Summary(pl): Obs³uga obiektowego C dla kompilatora gcc
140 Summary(tr): gcc için Objective C desteði
141 Group: Development/Languages
144 Requires: libobjc = %{GCC_VERSION}
145 Requires: gcc = %{GCC_VERSION}
148 This package adds Objective C support to the GNU C compiler. Objective
149 C is a object oriented derivative of the C language, mainly used on
150 systems running NeXTSTEP. This package does not include the standard
151 objective C object library.
153 %description objc -l de
154 Dieses Paket ergänzt den GNU-C-Compiler durch Objective-C-Support.
155 Objective C ist ein objektorientiertes Derivat von C, das zur
156 Hauptsache auf Systemen mit NeXTSTEP zum Einsatz kommt. Die
157 Standard-Objective-C-Objekt-Library ist nicht Teil des Pakets.
159 %description objc -l fr
160 Ce package ajoute un support Objective C au compilateur C GNU.
161 L'Objective C est un langage orienté objetdérivé du langage C,
162 principalement utilisé sur les systèmes NeXTSTEP. Ce package n'inclue
163 pas la bibliothéque Objective C standard.
165 %description objc -l pl
166 Ten pakiet dodaje obs³ugê obiektowego C do kompilatora gcc. Obiektowe
167 C (objc) jest zorientowan± obiektowo pochodn± jêzyka C, u¿ywan±
168 g³ównie w systemach u¿ywaj±cych NeXTSTEP. W pakiecie nie ma
169 standardowej biblioteki objc (która znajduje siê w osobnym pakiecie).
171 %description objc -l tr
172 Bu paket, GNU C derleyicisine Objective C desteði ekler. Objective C,
173 C dilinin nesne yönelik bir türevidir ve NeXTSTEP altýnda çalýþan
174 sistemlerde yaygýn olarak kullanýlýr. Standart Objective C nesne
175 kitaplýðý bu pakette yer almaz.
178 Summary: Objective C Libraries
179 Summary(pl): Biblioteki Obiektowego C
181 Version: %{GCC_VERSION}
184 %description -n libobjc
185 Objective C Libraries.
187 %description -n libobjc -l pl
188 Biblioteki Obiektowego C.
190 %package -n libobjc-static
191 Summary: Static Objective C Libraries
192 Summary(pl): Statyczne Biblioteki Obiektowego C
193 Group: Development/Libraries
194 Version: %{GCC_VERSION}
195 Requires: libobjc = %{GCC_VERSION}
197 %description -n libobjc-static
198 Static Objective C Libraries.
200 %description -n libobjc-static -l pl
201 Statyczne biblioteki Obiektowego C.
204 Summary: Fortran 77 support for gcc
205 Summary(pl): Obs³uga Fortranu 77 dla gcc
206 Summary(pt_BR): Suporte Fortran 77 para o GCC
207 Group: Development/Languages/Fortran
208 Version: %{GCC_VERSION}
210 Requires: libg2c = %{GCC_VERSION}
213 This apckage adds support for compiling Fortran 77 programs with the
216 %description g77 -l pl
217 Ten pakiet dodaje obs³ugê Fortranu 77 do kompilatora gcc. Jest
218 potrzebny do kompilowania programów pisanych w jêzyku Fortran 77.
220 %description g77 -l pt_BR
221 Suporte Fortran 77 para o GCC.
224 Summary: Fortran 77 Libraries
225 Summary(pl): Biblioteki Fortranu 77
227 Version: %{GCC_VERSION}
229 %description -n libg2c
230 Fortran 77 Libraries.
232 %description -n libg2c -l pl
233 Biblioteki Fortranu 77.
235 %package -n libg2c-static
236 Summary: Static Fortran 77 Libraries
237 Summary(pl): Statyczne Biblioteki Fortranu 77
238 Group: Development/Libraries
239 Version: %{GCC_VERSION}
240 Requires: libg2c = %{GCC_VERSION}
242 %description -n libg2c-static
243 Static Fortran 77 Libraries.
245 %description -n libg2c-static -l pl
246 Statyczne biblioteki Fortranu 77.
249 Summary: Java support for gcc
250 Summary(pl): Obs³uga Javy dla gcc
251 Group: Development/Languages/Java
252 Version: %{GCC_VERSION}
253 Requires: %{name} = %{version}
254 Requires: libgcj >= 3.0.0
255 Requires: libgcj-devel >= 3.0.0
256 Requires: java-shared
257 Provides: gcj = %{epoch}:%{GCC_VERSION}-%{release}
260 This package adds experimental support for compiling Java(tm) programs
261 and bytecode into native code. To use this you will also need the
264 %description -l pl java
265 Wsparcie dla kompilowania programów Java(tm) zrówno do bajt-kodu jak i
266 do natywnego kodu. Dodatkowo wymagany jest pakiet libgcj, aby mo¿na
267 by³o przeprowadziæ kompilacjê.
270 Summary: Shared java tools
271 Summary(pl): Wspó³dzielone narzêdzia javy
272 Group: Development/Languages/Java
273 Version: %{GCC_VERSION}
274 Provides: jar = %{epoch}:%{GCC_VERSION}-%{release}
275 Provides: java-shared
277 Obsoletes: java-shared
280 %description java-tools
281 This package contains tools that are common for every Java(tm) implementation,
284 %description java-tools -l pl
285 Pakiet ten zawiera narzêdzia wspólne dla ka¿dej implementacji Javy(tm), takie
289 Summary: Java Class Libraries
290 Summary(pl): Biblioteki Klas Javy
292 Version: %{GCC_VERSION}
296 %description -n libgcj
297 Java Class Libraries.
299 %description -n libgcj -l pl
300 Biblioteki Klas Javy.
302 %package -n libgcj-devel
303 Summary: Development files for Java Class Libraries
304 Summary(pl): Pliki nag³ówkowe dla Bibliotek Klas Javy
305 Group: Development/Libraries
306 Version: %{GCC_VERSION}
307 Requires: libgcj = %{GCC_VERSION}
308 Requires: %{name}-java
309 Obsoletes: libgcj3-devel
311 %description -n libgcj-devel
312 Development files for Java Class Libraries.
314 %description -n libgcj-devel -l pl
315 Pliki nag³ówkowe dla Bibliotek Klas Javy.
317 %package -n libgcj-static
318 Summary: Static Java Class Libraries
319 Summary(pl): Statyczne Biblioteki Klas Javy
320 Group: Development/Libraries
321 Version: %{GCC_VERSION}
322 Requires: libstdc++-devel = %{GCC_VERSION}
323 Requires: libgcj-devel = %{GCC_VERSION}
325 %description -n libgcj-static
326 Static Java Class Libraries.
328 %description -n libgcj-static -l pl
329 Statyczne Biblioteki Klas Javy.
331 %package -n libstdc++
332 Summary: GNU c++ library
333 Summary(pl): Biblioteki GNU C++
334 Summary(pt_BR): Biblioteca C++ GNU
336 Version: %{GCC_VERSION}
338 Obsoletes: libstdc++3
340 %description -n libstdc++
341 This is the GNU implementation of the standard C++ libraries, along
342 with additional GNU tools. This package includes the shared libraries
343 necessary to run C++ applications.
345 %description -n libstdc++ -l de
346 Dies ist die GNU-Implementierung der Standard-C++-Libraries mit
347 weiteren GNU-Tools. Dieses Paket enthält die zum Ausführen von
348 C++-Anwendungen erforderlichen gemeinsam genutzten Libraries.
350 %description -n libstdc++ -l es
351 Este es el soporte de las bibliotecas padrón del C++, junto con
352 herramientas GNU adicionales. El paquete incluye las bibliotecas
353 compartidas necesarias para ejecutar aplicaciones C++.
355 %description -n libstdc++ -l fr
356 Ceci est l'implémentation GNU des librairies C++ standard, ainsi que
357 des outils GNU supplémentaires. Ce package comprend les librairies
358 partagées nécessaires à l'exécution d'application C++.
360 %description -n libstdc++ -l pl
361 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
362 bibliotek C++. Znajduj± siê w nim biblioteki dynamiczne niezbêdne do
363 uruchomienia aplikacji napisanych w C++.
365 %description -n libstdc++ -l pt_BR
366 Este pacote é uma implementação da biblioteca padrão C++ v3, um
367 subconjunto do padrão ISO 14882.
369 %description -n libstdc++ -l tr
370 Bu paket, standart C++ kitaplýklarýnýn GNU gerçeklemesidir ve C++
371 uygulamalarýnýn koþturulmasý için gerekli kitaplýklarý içerir.
373 %package -n libstdc++-devel
374 Summary: Header files and documentatino for C++ development
375 Summary(de): Header-Dateien zur Entwicklung mit C++
376 Summary(fr): Fichiers d'en-tête et biblitothèques pour développer en C++
377 Summary(pl): Pliki nag³ówkowe i dokumentacja do biblioteki standardowej C++
378 Summary(pt_BR): Arquivos de inclusão e bibliotecas para o desenvolvimento em C++
379 Summary(tr): C++ ile program geliþtirmek için gerekli dosyalar
380 Group: Development/Libraries
381 Version: %{GCC_VERSION}
382 Requires: libstdc++ = %{GCC_VERSION}
383 Requires: %{name}-c++ = %{GCC_VERSION}
384 Obsoletes: libg++-devel
385 Obsoletes: libstdc++3-devel
387 %description -n libstdc++-devel
388 This is the GNU implementation of the standard C++ libraries. This
389 package includes the header files needed for C++ development and
390 library documentation.
392 %description -n libstdc++-devel -l es
393 Este es el soporte de las bibliotecas padrón del lenguaje C++. Este paquete
394 incluye los archivos de inclusión y bibliotecas necesarios para desarrollo de
395 programas en lenguaje C++.
397 %description -n libstdc++-devel -l pl
398 Pakiet ten zawiera biblioteki bêd±ce implementacj± standardowych
399 bibliotek C++. Znajduj± siê w nim pliki nag³ówkowe wykorzystywane przy
400 programowaniu w jêzyku C++ oraz dokumentacja biblioteki standardowej.
402 %description -n libstdc++-devel -l pt_BR
403 Este pacote inclui os arquivos de inclusão e bibliotecas necessárias para
404 desenvolvimento de programas C++.
406 %package -n libstdc++-static
407 Summary: Static C++ standard library
408 Summary(pl): Statyczna biblioteka standardowa C++
409 Group: Development/Libraries
410 Version: %{GCC_VERSION}
411 Requires: libstdc++-devel = %{GCC_VERSION}
413 %description -n libstdc++-static
414 Static C++ standard library.
416 %description -n libstdc++-static -l pl
417 Statycza biblioteka standardowa C++.
420 Summary: Foreign Function Interface library
421 Summary(pl): Biblioteka zewnêtrznych wywo³añ funkcji
423 Version: %{GCC_VERSION}
425 %description -n libffi
426 The libffi library provides a portable, high level programming
427 interface to various calling conventions. This allows a programmer to
428 call any function specified by a call interface description at run
431 %description -n libffi -l pl
432 Biblioteka libffi dostarcza przno¶nego, wysokopoziomowego miêdzymordzia
433 do ró¿nych konwencji wywo³añ funkcji. Pozwala to programi¶cie wywo³ywaæ
434 dowolne funkcje podaj±c konwencjê wywo³ania w czasie wykonania.
436 %package -n libffi-devel
437 Summary: Development files for Foreign Function Interface library
438 Summary(pl): Pliki nag³ówkowe dla libffi
439 Group: Development/Libraries
440 Version: %{GCC_VERSION}
441 Requires: libffi = %{GCC_VERSION}
443 %description -n libffi-devel
444 Development files for Foreign Function Interface library.
446 %description -n libffi-devel -l pl
447 Pliki nag³ówkowe dla libffi.
449 %package -n libffi-static
450 Summary: Static Foreign Function Interface library
451 Summary(pl): Statyczna biblioteka libffi
452 Group: Development/Libraries
453 Version: %{GCC_VERSION}
454 Requires: libffi-devel = %{GCC_VERSION}
456 %description -n libffi-static
457 Static Foreign Function Interface library.
459 %description -n libffi-static -l pl
460 Statyczna biblioteka libffi.
463 Summary: Ada support for gcc
464 Summary(pl): Obs³uga Ady do gcc
465 Group: Development/Languages
466 Version: %{GCC_VERSION}
467 Requires: libgnat = %{GCC_VERSION}
468 Requires: gcc = %{GCC_VERSION}
470 Obsoletes: gnat-devel
473 This package adds experimental support for compiling Ada programs.
475 %description -l pl ada
476 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
480 Summary: Ada standard libraries
481 Summary(pl): Biblioteki standardowe dla Ady
483 Version: %{GCC_VERSION}
487 %description -n libgnat
488 This package contains shared libraries needed to run programs written
491 %description -n libgnat -l pl
492 Ten pakiet zawiera biblioteki potrzebne do uruchamiania programów napisanych
495 %package -n libgnat-static
496 Summary: Static Ada standard libraries
497 Summary(pl): Statyczne biblioteki standardowe dla Ady
499 Version: %{GCC_VERSION}
500 Obsoletes: gnat-static
502 %description -n libgnat-static
503 This package contains static libraries for programs written in Ada.
505 %description -n libgnat-static -l pl
506 Ten pakiet zawiera biblioteki statyczne dla programów napisanych w
510 Summary: Ksi support for gcc
511 Summary(pl): Obs³uga Ksi dla gcc
512 Version: %{GCC_VERSION}.%{KSI_VERSION}
513 Group: Development/Languages
514 Requires: gcc = %{GCC_VERSION}
517 This package adds experimental support for compiling Ksi programs
518 into native code. You proabably don't need it, unless your are going
519 to develop a compiler using Ksi as intermediate representation or
520 you are using such compiler (like Gont).
522 %description ksi -l pl
523 Ten pakiet dodaje eksperymentalne wsparcie dla kompilacji programów
524 w Ksi do kodu maszynowego. Prawdopodobnie nie potrzebujesz go, chyba
525 ¿e zamierzasz pisaæ kompilator u¿ywaj±cy Ksi jako reprezentacji
526 po¶rednicz±cej, lub u¿ywasz takiego kompilatora (jak Gont).
529 Summary: The C Pre Processor
530 Summary(pl): Preprocesor C
531 Summary(pt_BR): Preprocessador para a linguagem C
532 Group: Development/Languages
533 Version: %{GCC_VERSION}
538 The C preprocessor is a "macro processor" that is used automatically
539 by the C compiler to transform your program before actual compilation.
540 It is called a macro processor because it allows you to define
541 "macros", which are brief abbreviations for longer constructs.
543 The C preprocessor provides four separate facilities that you can use
546 - Inclusion of header files. These are files of declarations that can
547 be substituted into your program.
548 - Macro expansion. You can define "macros", which are abbreviations
549 for arbitrary fragments of C code, and then the C preprocessor will
550 replace the macros with their definitions throughout the program.
551 - Conditional compilation. Using special preprocessing directives, you
552 can include or exclude parts of the program according to various
554 - Line control. If you use a program to combine or rearrange source
555 files into an intermediate file which is then compiled, you can use
556 line control to inform the compiler of where each source line
557 originally came from.
559 %description -n cpp -l es
560 Um preprocessador para a linguagem C.
562 %description -n cpp -l pl
563 Przeprocesor C jest "makro procesorem" który jest automatycznie
564 u¿ywany przez kompilator C do obróbki kompilowanego programu przed
565 w³a¶ciw± kompilacj±. Jest on nazywany makroprocesorem, poniewa¿
566 umo¿liwia definiowanie i rozwijanie makr umo¿liwiaj±cych skracanie
567 d³ugich konstrukcji w jêzyku C.
569 Preprocesor C umo¿liwia wykonywanie czterech ró¿nych typów operacji:
571 - Do³±czanie plików (np. nag³ówkowych). Wstawia pliki w miejscu
572 deklaracji polecenia do³±czenia innego pliku.
573 - Rozwijanie makr. Mo¿na definiowaæ "makra" nadaj±c im identyfikatory,
574 których pó¼niejsze u¿ycie powoduje podczas rozwijania podmienienie
575 indentyfikatora deklarowan± wcze¶niej warto¶ci±.
576 - Kompilacja warunkowa. W zale¿no¶ci od obecno¶ci symboli i dyrektyw w
577 ¶rodowisku preprocesora s± w³±czane warunkowo, b±d¼ nie, pewne
578 fragmenty obrabianego strumienia tekstów.
579 - Kontrola linii ¼ród³a. Niezale¿nie od tego jakim przeobra¿eniom
580 podlega wynikowy strumieñ danych w wyniku rozwijania makr i do³±czania
581 s± zapamiêtywane informacje o tym, której linii pliku ¼ród³owego
582 odpowiada fragment pliku wynikowego.
584 %description -n cpp -l pt_BR
585 O preprocessador C é um "processador de macros", que é utilizado pelo
586 compilador C para fazer algumas modificações no seu programa, antes da
587 compilação em si. Ele é chamado de "processador de macros" porque
588 permite a você definir "macros", que são abreviações para construções
591 O preprocessador C fornece quatro funcionalidades básicas: inclusão de
592 arquivos de cabeçalho; expansão de macros; compilação condicional;
593 e controle da numeração das linhas do programa.
596 %setup -q -a1 -n %{name}-%{GCC_VERSION}
597 mv ksi-%{KSI_VERSION} gcc/ksi
621 # because we distribute modified version of gcc...
622 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
623 perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld.org.pl/>";@' gcc/version.c
626 # cd gcc && autoconf; cd ..
627 # autoconf is not needed!
628 rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform}
630 CFLAGS="%{rpmcflags}" \
631 CXXFLAGS="%{rpmcflags}" \
632 TEXCONFIG=false ../configure \
633 --prefix=%{_prefix} \
634 --infodir=%{_infodir} \
635 --mandir=%{_mandir} \
637 --enable-threads=posix \
638 --enable-__cxa_atexit \
639 --enable-languages="c,c++,f77%{?!_without_objc:,objc}%{?_with_ada:,ada}%{!?_without_java:,java},ksi" \
647 --with-slibdir=%{_slibdir} \
651 PATH=$PATH:/sbin:%{_sbindir}
653 # this dirty hack is relict of setting, where objdir is subdir of srcdir
655 sed -e 's/srcdir=\$(fsrcdir)/srcdir=\$(fsrcdir) VPATH=\$(fsrcdir)/' \
656 gcc/ada/Makefile > makefile.tmp
657 mv -f makefile.tmp gcc/ada/Makefile
661 %{__make} -C obj-%{_target_platform} bootstrap-lean \
662 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
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
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%{?_with_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*