package info files
[platform/upstream/gcc48.git] / packaging / gcc47.spec
1 %define fast_build 1
2
3 # Ada currently fails to build on a few platforms, enable it only
4 # on those that work
5 # Note that AdaCore only supports %ix86, x86_64 and ia64
6 %ifarch %ix86 x86_64
7 %define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
8 %else
9 %define build_ada 0
10 %endif
11
12 %define quadmath_arch %ix86 x86_64 
13
14 # We don't want to build java
15 %define build_java 1
16 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
17
18 %define build_cp 1
19 %define build_fortran 1
20 %define build_objc 1
21 %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
22 %define build_with_mudflap 0
23
24 %if %{build_objcp}
25 %define build_cp 1
26 %define build_objc 1
27 %endif
28
29 %if %{build_libjava}
30 %define build_cp 1
31 %endif
32
33 # For optional compilers only build C, C++ and Fortran
34 ##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
35 %if 0%{!?building_libffi:1}
36 %define build_ada 0
37 %define build_java 0
38 %define build_libjava 0
39 %define build_objc 1
40 %define build_objcp 1
41 %endif
42
43
44 Name:         gcc47
45 BuildRequires: bison
46 BuildRequires: flex
47 BuildRequires: gettext-tools
48 BuildRequires: makeinfo
49 BuildRequires: glibc-devel-32bit
50 BuildRequires: mpc-devel
51 BuildRequires: mpfr-devel
52 BuildRequires: perl
53 BuildRequires: texinfo
54 BuildRequires: zlib-devel
55 %ifarch %ix86 x86_64 %arm
56 BuildRequires: cloog-devel
57 BuildRequires: ppl-devel
58 %endif
59 %if %{build_ada}
60 %define hostsuffix -4.7
61 BuildRequires: gcc47-ada
62 %endif
63 %if 0%{?building_libjava:1}%{?building_testsuite:1}
64 BuildRequires: fastjar
65 BuildRequires: unzip
66 %endif
67 %if 0%{?building_libffi:1}
68 BuildRequires: pkg-config
69 %endif
70 %if 0%{?run_tests:1}
71 BuildRequires: dejagnu
72 BuildRequires: expect
73 BuildRequires: gdb
74 %endif
75
76 # Define version number of libgcc_s
77 %define libgcc_s 1
78 %define build_nof 0
79
80 %define separate_bi32 0
81 %define separate_bi64 0
82 %ifarch x86_64 
83 %define separate_bi32 1
84 %endif
85
86 # Define two macros to trigger -32bit or -64bit package variants
87 %define separate_biarch 0
88 %if %{separate_bi32}
89 %define separate_biarch 1
90 %define separate_biarch_suffix -32bit
91 %endif
92 %if %{separate_bi64}
93 %define separate_biarch 1
94 %define separate_biarch_suffix -64bit
95 %endif
96
97 %ifarch x86_64
98 # 64-bit is primary build target
99 %define build_primary_64bit 1
100 %else
101 %define build_primary_64bit 0
102 %endif
103
104 %define biarch_libjava 0
105
106 # COMMON-BEGIN
107 %define biarch_targets x86_64 
108
109 URL:          http://gcc.gnu.org/
110 Version: 4.7.2
111 Release:      1
112 %define gcc_version %(echo %version | sed 's/_.*//')
113 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
114 %define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
115 %define binsuffix -4.7
116 # COMMON-END
117
118 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
119 Requires: binutils glibc-devel
120 Requires: cpp47 = %{version}-%{release}
121 %if 0%{!?build_optional_compiler:1}
122 Requires: libgcc%{libgcc_s} >= %{version}-%{release}
123 Requires: libgomp1 >= %{version}-%{release}
124 %if %{build_with_mudflap}
125 Requires: libmudflap0 >= %{version}-%{release}
126 Requires: libmudflapth0 >= %{version}-%{release}
127 %endif
128 %else
129 Requires: libgcc47 = %{version}-%{release}
130 Requires: libgomp47 = %{version}-%{release}
131 %endif
132 %endif
133
134 # COMMON-BEGIN
135 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
136 #Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
137 Source:     gcc-%{version}.tar.bz2
138
139 Source1:        change_spec
140 Source2:        libgcj47-rpmlintrc
141 Source3:        gcc47-rpmlintrc
142 Source4:        ecj.jar
143 Source6:        baselibs.conf
144 # Patches auto-generated by git-buildpackage:
145 Patch0:     0001-dir-version.patch
146 Patch1:     0002-textdomain.patch
147 Patch2:     0003-rename-info-files.patch
148 Patch3:     0004-ARM-linker.patch
149
150 # GCC-TESTSUITE-DELETE-BEGIN
151 # LIBFFI-DELETE-BEGIN
152 # LIBJAVA-DELETE-BEGIN
153 Group:          Development/Languages/C and C++
154 Summary:        The GNU C Compiler and Support Files
155 License:        GPL-3.0+
156
157 %description
158 Core package for the GNU Compiler Collection, including the C language
159 frontend.
160
161 Language frontends other than C are split to different sub-packages,
162 namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
163 gcc-obj-c++.
164
165
166
167 # COMMON-END
168 %package -n gcc47-32bit
169 Summary:      The GNU C Compiler 32bit support
170 Group:        Development/Languages/C and C++
171 Requires: gcc47 = %{version}-%{release}
172 %if 0%{!?build_optional_compiler:1}
173 Requires: libgcc%{libgcc_s}-32bit >= %{version}-%{release}
174 Requires: libgomp1-32bit >= %{version}-%{release}
175 %if %{build_with_mudflap}
176 Requires: libmudflap0-32bit >= %{version}-%{release}
177 Requires: libmudflapth0-32bit >= %{version}-%{release}
178 %endif
179 %else
180 Requires: libgcc47-32bit = %{version}-%{release}
181 Requires: libgomp47-32bit = %{version}-%{release}
182 %endif
183 Requires: glibc-devel-32bit
184
185 %description -n gcc47-32bit
186 This package contains 32bit support for the GNU Compiler Collection.
187
188 %package -n gcc47-64bit
189 Summary:      The GNU C Compiler 64bit support
190 Group:        Development/Languages/C and C++
191 Requires: gcc47 = %{version}-%{release}
192 %if 0%{!?build_optional_compiler:1}
193 Requires: libgcc%{libgcc_s}-64bit >= %{version}-%{release}
194 Requires: libgomp1-64bit >= %{version}-%{release}
195 %if %{build_with_mudflap}
196 Requires: libmudflap0-64bit >= %{version}-%{release}
197 Requires: libmudflapth0-64bit >= %{version}-%{release}
198 %endif
199 %else
200 Requires: libgcc47-64bit = %{version}-%{release}
201 Requires: libgomp47-64bit = %{version}-%{release}
202 %endif
203 Requires: glibc-devel-64bit
204
205 %description -n gcc47-64bit
206 This package contains 64bit support for the GNU Compiler Collection.
207
208
209 %package locale
210 Summary:      Locale Data for the GNU Compiler Collection
211 License:        GPL-3.0+
212 Group:        Development/Languages/C and C++
213 Requires: gcc47 = %{version}-%{release}
214
215 %description locale
216 Locale data for the GNU Compiler Collection (GCC) to give error message
217 in the current locale.
218
219
220 %package c++
221 Summary:      The GNU C++ Compiler
222 License:        GPL-3.0+
223 Group:        Development/Languages/C and C++
224 Requires: gcc47 = %{version}-%{release}
225 Requires: libstdc++47-devel = %{version}-%{release}
226
227 %description c++
228 This package contains the GNU compiler for C++.
229
230 # PACKAGE-BEGIN
231 # PACKAGE-BEGIN
232 %package -n libstdc++47-devel
233 Summary:      Include Files and Libraries mandatory for Development
234 License:        GPL-3.0-with-GCC-exception
235 Group:        Development/Languages/C and C++
236 %if 0%{!?build_optional_compiler:1}
237 Requires: libstdc++6 >= %{version}-%{release}
238 %else
239 Requires: libstdc++47 = %{version}-%{release}
240 %endif
241 Requires: glibc-devel
242
243 %description -n libstdc++47-devel
244 This package contains all the headers and libraries of the standard C++
245 library. It is needed for compiling C++ code.
246 # PACKAGE-END
247 # PACKAGE-BEGIN
248 # PACKAGE-BEGIN
249 %package -n libstdc++47-devel-32bit
250 Summary:      Include Files and Libraries mandatory for Development
251 License:        GPL-3.0-with-GCC-exception
252 Group:        Development/Languages/C and C++
253 %if 0%{!?build_optional_compiler:1}
254 Requires: libstdc++6-32bit >= %{version}-%{release}
255 %else
256 Requires: libstdc++47-32bit = %{version}-%{release}
257 %endif
258 Requires: glibc-devel-32bit
259
260 %description -n libstdc++47-devel-32bit
261 This package contains all the headers and libraries of the standard C++
262 library. It is needed for compiling C++ code.
263 # PACKAGE-END
264 # PACKAGE-BEGIN
265 # PACKAGE-BEGIN
266 %package -n libstdc++47-devel-64bit
267 Summary:      Include Files and Libraries mandatory for Development
268 License:        GPL-3.0-with-GCC-exception
269 Group:        Development/Languages/C and C++
270 %if 0%{!?build_optional_compiler:1}
271 Requires: libstdc++6-64bit >= %{version}-%{release}
272 %else
273 Requires: libstdc++47-64bit = %{version}-%{release}
274 %endif
275 Requires: glibc-devel-64bit
276
277 %description -n libstdc++47-devel-64bit
278 This package contains all the headers and libraries of the standard C++
279 library. It is needed for compiling C++ code.
280 # PACKAGE-END
281
282 %package -n libstdc++47-doc
283 Summary:      Documentation for the GNU C++ standard library
284 License:        GPL-3.0+
285 Group:        Documentation/HTML
286 BuildArch:    noarch
287
288 %description -n libstdc++47-doc
289 Extensive HTML documentation for the GNU C++ standard library.
290
291
292 # PACKAGE-BEGIN
293 # PACKAGE-BEGIN
294 %package -n libgcc47
295 Summary:      C compiler runtime library
296 License:        GPL-3.0-with-GCC-exception
297 Group:        System/Base
298 %if 0%{!?build_optional_compiler:1}
299 Provides: libgcc%{libgcc_s} = %{version}-%{release}
300 Conflicts: libgcc%{libgcc_s} < %{version}-%{release}
301 %else
302 Autoprov: no
303 %endif
304
305 %description -n libgcc47
306 Libgcc is needed for dynamically linked C programs.
307
308 %post -n libgcc47
309 /sbin/ldconfig
310
311 %postun -n libgcc47
312 /sbin/ldconfig
313 # PACKAGE-END
314 # PACKAGE-BEGIN
315 # PACKAGE-BEGIN
316 %package -n libgcc47-32bit
317 Summary:      C compiler runtime library
318 License:        GPL-3.0-with-GCC-exception
319 Group:        System/Base
320 %if 0%{!?build_optional_compiler:1}
321 Provides: libgcc%{libgcc_s}-32bit = %{version}-%{release}
322 Conflicts: libgcc%{libgcc_s}-32bit < %{version}-%{release}
323 %else
324 Autoprov: no
325 %endif
326
327 %description -n libgcc47-32bit
328 Libgcc is needed for dynamically linked C programs.
329
330 %post -n libgcc47-32bit
331 /sbin/ldconfig
332
333 %postun -n libgcc47-32bit
334 /sbin/ldconfig
335 # PACKAGE-END
336 # PACKAGE-BEGIN
337 # PACKAGE-BEGIN
338 %package -n libgcc47-64bit
339 Summary:      C compiler runtime library
340 License:        GPL-3.0-with-GCC-exception
341 Group:        System/Base
342 %if 0%{!?build_optional_compiler:1}
343 Provides: libgcc%{libgcc_s}-64bit = %{version}-%{release}
344 Conflicts: libgcc%{libgcc_s}-64bit < %{version}-%{release}
345 %else
346 Autoprov: no
347 %endif
348
349 %description -n libgcc47-64bit
350 Libgcc is needed for dynamically linked C programs.
351
352 %post -n libgcc47-64bit
353 /sbin/ldconfig
354
355 %postun -n libgcc47-64bit
356 /sbin/ldconfig
357 # PACKAGE-END
358
359 # PACKAGE-BEGIN
360 # PACKAGE-BEGIN
361 %package -n libgomp47
362 Summary:      The GNU compiler collection OpenMP runtime library
363 License:        GPL-3.0-with-GCC-exception
364 Group:        System/Base
365 %if 0%{!?build_optional_compiler:1}
366 Provides: libgomp1 = %{version}-%{release}
367 Conflicts: libgomp1 < %{version}-%{release}
368 %else
369 Autoprov: no
370 %endif
371
372 %description -n libgomp47
373 This is the OpenMP runtime library needed by OpenMP enabled programs
374 that were built with the -fopenmp compiler option and by programs that
375 were auto-parallelized via the -ftree-parallelize-loops compiler
376 option.
377
378
379 %post -n libgomp47
380 /sbin/ldconfig
381
382 %postun -n libgomp47
383 /sbin/ldconfig
384 # PACKAGE-END
385 # PACKAGE-BEGIN
386 # PACKAGE-BEGIN
387 %package -n libgomp47-32bit
388 Summary:      The GNU compiler collection OpenMP runtime library
389 License:        GPL-3.0-with-GCC-exception
390 Group:        System/Base
391 %if 0%{!?build_optional_compiler:1}
392 Provides: libgomp1-32bit = %{version}-%{release}
393 Conflicts: libgomp1-32bit < %{version}-%{release}
394 %else
395 Autoprov: no
396 %endif
397
398 %description -n libgomp47-32bit
399 This is the OpenMP runtime library needed by OpenMP enabled programs
400 that were built with the -fopenmp compiler option and by programs that
401 were auto-parallelized via the -ftree-parallelize-loops compiler
402 option.
403
404
405 %post -n libgomp47-32bit
406 /sbin/ldconfig
407
408 %postun -n libgomp47-32bit
409 /sbin/ldconfig
410 # PACKAGE-END
411 # PACKAGE-BEGIN
412 # PACKAGE-BEGIN
413 %package -n libgomp47-64bit
414 Summary:      The GNU compiler collection OpenMP runtime library
415 License:        GPL-3.0-with-GCC-exception
416 Group:        System/Base
417 %if 0%{!?build_optional_compiler:1}
418 Provides: libgomp1-64bit = %{version}-%{release}
419 Conflicts: libgomp1-64bit < %{version}-%{release}
420 %else
421 Autoprov: no
422 %endif
423
424 %description -n libgomp47-64bit
425 This is the OpenMP runtime library needed by OpenMP enabled programs
426 that were built with the -fopenmp compiler option and by programs that
427 were auto-parallelized via the -ftree-parallelize-loops compiler
428 option.
429
430
431 %post -n libgomp47-64bit
432 /sbin/ldconfig
433
434 %postun -n libgomp47-64bit
435 /sbin/ldconfig
436 # PACKAGE-END
437
438 # PACKAGE-BEGIN
439 # PACKAGE-BEGIN
440 %package -n libstdc++47
441 Summary:      The standard C++ shared library
442 License:        GPL-3.0-with-GCC-exception
443 Group:        System/Libraries
444 %if 0%{!?build_optional_compiler:1}
445 Provides: libstdc++6 = %{version}-%{release}
446 Conflicts: libstdc++6 < %{version}-%{release}
447 %else
448 Autoprov: no
449 %endif
450
451 %description -n libstdc++47
452 The standard C++ library, needed for dynamically linked C++ programs.
453
454
455 %post -n libstdc++47
456 /sbin/ldconfig
457
458 %postun -n libstdc++47
459 /sbin/ldconfig
460 # PACKAGE-END
461 # PACKAGE-BEGIN
462 # PACKAGE-BEGIN
463 %package -n libstdc++47-32bit
464 Summary:      The standard C++ shared library
465 License:        GPL-3.0-with-GCC-exception
466 Group:        System/Libraries
467 %if 0%{!?build_optional_compiler:1}
468 Provides: libstdc++6-32bit = %{version}-%{release}
469 Conflicts: libstdc++6-32bit < %{version}-%{release}
470 %else
471 Autoprov: no
472 %endif
473
474 %description -n libstdc++47-32bit
475 The standard C++ library, needed for dynamically linked C++ programs.
476
477
478 %post -n libstdc++47-32bit
479 /sbin/ldconfig
480
481 %postun -n libstdc++47-32bit
482 /sbin/ldconfig
483 # PACKAGE-END
484 # PACKAGE-BEGIN
485 # PACKAGE-BEGIN
486 %package -n libstdc++47-64bit
487 Summary:      The standard C++ shared library
488 License:        GPL-3.0-with-GCC-exception
489 Group:        System/Libraries
490 %if 0%{!?build_optional_compiler:1}
491 Provides: libstdc++6-64bit = %{version}-%{release}
492 Conflicts: libstdc++6-64bit < %{version}-%{release}
493 %else
494 Autoprov: no
495 %endif
496
497 %description -n libstdc++47-64bit
498 The standard C++ library, needed for dynamically linked C++ programs.
499
500
501 %post -n libstdc++47-64bit
502 /sbin/ldconfig
503
504 %postun -n libstdc++47-64bit
505 /sbin/ldconfig
506 # PACKAGE-END
507
508
509 %package info
510 Summary:      Documentation for the GNU compiler collection
511 License:      GFDL-1.2
512 Group:        Documentation/Other
513 BuildArch:    noarch
514
515 %description info
516 GNU info-pages for the GNU compiler collection covering both user-level
517 and internals documentation.
518
519
520 # PACKAGE-BEGIN
521 # PACKAGE-BEGIN
522 %package objc
523 Summary:      GNU Objective C Compiler
524 License:        GPL-3.0+
525 Group:        Development/Languages/Other
526 Requires: gcc47 = %{version}-%{release}
527 Requires: libobjc2 >= %{version}-%{release}
528
529 %description objc
530 This package contains the GNU Objective C compiler. Objective C is an
531 object oriented language, created by Next Inc. and used in their
532 Nextstep OS. The source code is available in the gcc package.
533 # PACKAGE-END
534 # PACKAGE-BEGIN
535 # PACKAGE-BEGIN
536 %package objc-32bit
537 Summary:      GNU Objective C Compiler
538 License:        GPL-3.0+
539 Group:        Development/Languages/Other
540 Requires: gcc47 = %{version}-%{release}
541 Requires: libobjc2-32bit >= %{version}-%{release}
542
543 %description objc-32bit
544 This package contains the GNU Objective C compiler. Objective C is an
545 object oriented language, created by Next Inc. and used in their
546 Nextstep OS. The source code is available in the gcc package.
547 # PACKAGE-END
548 # PACKAGE-BEGIN
549 # PACKAGE-BEGIN
550 %package objc-64bit
551 Summary:      GNU Objective C Compiler
552 License:        GPL-3.0+
553 Group:        Development/Languages/Other
554 Requires: gcc47 = %{version}-%{release}
555 Requires: libobjc2-64bit >= %{version}-%{release}
556
557 %description objc-64bit
558 This package contains the GNU Objective C compiler. Objective C is an
559 object oriented language, created by Next Inc. and used in their
560 Nextstep OS. The source code is available in the gcc package.
561 # PACKAGE-END
562
563 # PACKAGE-BEGIN
564 # PACKAGE-BEGIN
565 %package -n libobjc47
566 Summary:      Library for the GNU Objective C Compiler
567 License:        GPL-3.0-with-GCC-exception
568 Group:        Development/Libraries/Other
569 Provides: libobjc2 = %{version}-%{release}
570 Conflicts: libobjc2 < %{version}-%{release}
571
572 %description -n libobjc47
573 The library for the GNU Objective C compiler.
574
575 %post -n libobjc47
576 /sbin/ldconfig
577
578 %postun -n libobjc47
579 /sbin/ldconfig
580 # PACKAGE-END
581 # PACKAGE-BEGIN
582 # PACKAGE-BEGIN
583 %package -n libobjc47-32bit
584 Summary:      Library for the GNU Objective C Compiler
585 License:        GPL-3.0-with-GCC-exception
586 Group:        Development/Libraries/Other
587 Provides: libobjc2-32bit = %{version}-%{release}
588 Conflicts: libobjc2-32bit < %{version}-%{release}
589
590 %description -n libobjc47-32bit
591 The library for the GNU Objective C compiler.
592
593 %post -n libobjc47-32bit
594 /sbin/ldconfig
595
596 %postun -n libobjc47-32bit
597 /sbin/ldconfig
598 # PACKAGE-END
599 # PACKAGE-BEGIN
600 # PACKAGE-BEGIN
601 %package -n libobjc47-64bit
602 Summary:      Library for the GNU Objective C Compiler
603 License:        GPL-3.0-with-GCC-exception
604 Group:        Development/Libraries/Other
605 Provides: libobjc2-64bit = %{version}-%{release}
606 Conflicts: libobjc2-64bit < %{version}-%{release}
607
608 %description -n libobjc47-64bit
609 The library for the GNU Objective C compiler.
610
611 %post -n libobjc47-64bit
612 /sbin/ldconfig
613
614 %postun -n libobjc47-64bit
615 /sbin/ldconfig
616 # PACKAGE-END
617
618 %package obj-c++
619 Summary:      GNU Objective C++ Compiler
620 License:        GPL-3.0+
621 Group:        Development/Languages/Other
622 Requires: gcc47-objc = %{version}-%{release}
623 Requires: gcc47-c++ = %{version}-%{release}
624
625 %description obj-c++
626 This package contains the GNU Objective C++ compiler. Objective C++ is an
627 object oriented language, created by Next Inc. and used in their
628 Nextstep OS. The source code is available in the gcc package.
629
630
631 %package -n cpp47
632 Summary:      The GCC Preprocessor
633 License:        GPL-3.0+
634 Group:        Development/Languages/C and C++
635
636 %description -n cpp47
637 This Package contains just the preprocessor that is used by the X11
638 packages.
639
640
641 # PACKAGE-BEGIN
642 # PACKAGE-BEGIN
643 %package ada
644 Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
645 License:        GPL-3.0+
646 Group:        Development/Languages/Other
647 Requires: gcc47 = %{version}-%{release}
648 Requires: libada47 = %{version}-%{release}
649
650 %description ada
651 This package contains an Ada95 compiler and associated development
652 tools based on the GNU GCC technology. Ada95 is the object oriented
653 successor of the Ada83 language. To build this package from source you
654 must have installed a binary version to bootstrap the compiler.
655 # PACKAGE-END
656 # PACKAGE-BEGIN
657 # PACKAGE-BEGIN
658 %package ada-32bit
659 Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
660 License:        GPL-3.0+
661 Group:        Development/Languages/Other
662 Requires: gcc47-32bit = %{version}-%{release}
663 Requires: libada47-32bit = %{version}-%{release}
664
665 %description ada-32bit
666 This package contains an Ada95 compiler and associated development
667 tools based on the GNU GCC technology. Ada95 is the object oriented
668 successor of the Ada83 language. To build this package from source you
669 must have installed a binary version to bootstrap the compiler.
670 # PACKAGE-END
671 # PACKAGE-BEGIN
672 # PACKAGE-BEGIN
673 %package ada-64bit
674 Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
675 License:        GPL-3.0+
676 Group:        Development/Languages/Other
677 Requires: gcc47-64bit = %{version}-%{release}
678 Requires: libada47-64bit = %{version}-%{release}
679
680 %description ada-64bit
681 This package contains an Ada95 compiler and associated development
682 tools based on the GNU GCC technology. Ada95 is the object oriented
683 successor of the Ada83 language. To build this package from source you
684 must have installed a binary version to bootstrap the compiler.
685 # PACKAGE-END
686
687 # PACKAGE-BEGIN
688 # PACKAGE-BEGIN
689 %package -n libada47
690 Summary:      GNU Ada Runtime Libraries
691 License:      GPL-3.0-with-GCC-exception
692 Group:        System/Libraries
693 Provides: libgnarl-4_7 = %{version}-%{release}
694 Conflicts: libgnarl-4_7 < %{version}-%{release}
695 Provides: libgnat-4_7 = %{version}-%{release}
696 Conflicts: libgnat-4_7 < %{version}-%{release}
697
698 %description -n libada47
699 This package contains the shared libraries required to run programs
700 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
701 shared libraries. It also contains the shared libraries for the
702 Implementation of the Ada Semantic Interface Specification (ASIS), the
703 implementation of Distributed Systems Programming (GLADE) and the Posix
704 1003.5 Binding (Florist).
705
706 %post -n libada47
707 /sbin/ldconfig
708
709 %postun -n libada47
710 /sbin/ldconfig
711 # PACKAGE-END
712 # PACKAGE-BEGIN
713 # PACKAGE-BEGIN
714 %package -n libada47-32bit
715 Summary:      GNU Ada Runtime Libraries
716 License:      GPL-3.0-with-GCC-exception
717 Group:        System/Libraries
718 Provides: libgnarl-4_7-32bit = %{version}-%{release}
719 Conflicts: libgnarl-4_7-32bit < %{version}-%{release}
720 Provides: libgnat-4_7-32bit = %{version}-%{release}
721 Conflicts: libgnat-4_7-32bit < %{version}-%{release}
722
723 %description -n libada47-32bit
724 This package contains the shared libraries required to run programs
725 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
726 shared libraries. It also contains the shared libraries for the
727 Implementation of the Ada Semantic Interface Specification (ASIS), the
728 implementation of Distributed Systems Programming (GLADE) and the Posix
729 1003.5 Binding (Florist).
730
731 %post -n libada47-32bit
732 /sbin/ldconfig
733
734 %postun -n libada47-32bit
735 /sbin/ldconfig
736 # PACKAGE-END
737 # PACKAGE-BEGIN
738 # PACKAGE-BEGIN
739 %package -n libada47-64bit
740 Summary:      GNU Ada Runtime Libraries
741 License:      GPL-3.0-with-GCC-exception
742 Group:        System/Libraries
743 Provides: libgnarl-4_7-64bit = %{version}-%{release}
744 Conflicts: libgnarl-4_7-64bit < %{version}-%{release}
745 Provides: libgnat-4_7-64bit = %{version}-%{release}
746 Conflicts: libgnat-4_7-64bit < %{version}-%{release}
747
748 %description -n libada47-64bit
749 This package contains the shared libraries required to run programs
750 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
751 shared libraries. It also contains the shared libraries for the
752 Implementation of the Ada Semantic Interface Specification (ASIS), the
753 implementation of Distributed Systems Programming (GLADE) and the Posix
754 1003.5 Binding (Florist).
755
756 %post -n libada47-64bit
757 /sbin/ldconfig
758
759 %postun -n libada47-64bit
760 /sbin/ldconfig
761 # PACKAGE-END
762
763 # PACKAGE-BEGIN
764 # PACKAGE-BEGIN
765 %package fortran
766 Summary:      The GNU Fortran Compiler and Support Files
767 License:        GPL-3.0+
768 Group:        Development/Languages/Fortran
769 Requires: gcc47 = %{version}-%{release}
770 %if 0%{!?build_optional_compiler:1}
771 Requires: libgfortran3 >= %{version}-%{release}
772 %ifarch %quadmath_arch
773 Requires: libquadmath0 >= %{version}-%{release}
774 %endif
775 %else
776 Requires: libgfortran47 = %{version}-%{release}
777 %ifarch %quadmath_arch
778 Requires: libquadmath47 = %{version}-%{release}
779 %endif
780 %endif
781
782 %description fortran
783 This is the Fortran compiler of the GNU Compiler Collection (GCC).
784 # PACKAGE-END
785 # PACKAGE-BEGIN
786 # PACKAGE-BEGIN
787 %package fortran-32bit
788 Summary:      The GNU Fortran Compiler and Support Files
789 License:        GPL-3.0+
790 Group:        Development/Languages/Fortran
791 Requires: gcc47 = %{version}-%{release}
792 %if 0%{!?build_optional_compiler:1}
793 Requires: libgfortran3-32bit >= %{version}-%{release}
794 %ifarch %quadmath_arch
795 Requires: libquadmath0-32bit >= %{version}-%{release}
796 %endif
797 %else
798 Requires: libgfortran47-32bit = %{version}-%{release}
799 %ifarch %quadmath_arch
800 Requires: libquadmath47-32bit = %{version}-%{release}
801 %endif
802 %endif
803
804 %description fortran-32bit
805 This is the Fortran compiler of the GNU Compiler Collection (GCC).
806 # PACKAGE-END
807 # PACKAGE-BEGIN
808 # PACKAGE-BEGIN
809 %package fortran-64bit
810 Summary:      The GNU Fortran Compiler and Support Files
811 License:        GPL-3.0+
812 Group:        Development/Languages/Fortran
813 Requires: gcc47 = %{version}-%{release}
814 %if 0%{!?build_optional_compiler:1}
815 Requires: libgfortran3-64bit >= %{version}-%{release}
816 %ifarch %quadmath_arch
817 Requires: libquadmath0-64bit >= %{version}-%{release}
818 %endif
819 %else
820 Requires: libgfortran47-64bit = %{version}-%{release}
821 %ifarch %quadmath_arch
822 Requires: libquadmath47-64bit = %{version}-%{release}
823 %endif
824 %endif
825
826 %description fortran-64bit
827 This is the Fortran compiler of the GNU Compiler Collection (GCC).
828 # PACKAGE-END
829
830 # PACKAGE-BEGIN
831 # PACKAGE-BEGIN
832 %package -n libgfortran47
833 Summary:      The GNU Fortran Compiler Runtime Library
834 License:        GPL-3.0-with-GCC-exception
835 Group:        Development/Languages/Fortran
836 %if 0%{!?build_optional_compiler:1}
837 Provides: libgfortran3 = %{version}-%{release}
838 Conflicts: libgfortran3 < %{version}-%{release}
839 %ifarch %quadmath_arch
840 Requires: libquadmath0 >= %{version}-%{release}
841 %endif
842 %else
843 %ifarch %quadmath_arch
844 Requires: libquadmath47 = %{version}-%{release}
845 %endif
846 Autoprov: no
847 %endif
848
849 %description -n libgfortran47
850 The runtime library needed to run programs compiled with the Fortran compiler
851 of the GNU Compiler Collection (GCC).
852
853 %post -n libgfortran47
854 /sbin/ldconfig
855
856 %postun -n libgfortran47
857 /sbin/ldconfig
858 # PACKAGE-END
859 # PACKAGE-BEGIN
860 # PACKAGE-BEGIN
861 %package -n libgfortran47-32bit
862 Summary:      The GNU Fortran Compiler Runtime Library
863 License:        GPL-3.0-with-GCC-exception
864 Group:        Development/Languages/Fortran
865 %if 0%{!?build_optional_compiler:1}
866 Provides: libgfortran3-32bit = %{version}-%{release}
867 Conflicts: libgfortran3-32bit < %{version}-%{release}
868 %ifarch %quadmath_arch
869 Requires: libquadmath0-32bit >= %{version}-%{release}
870 %endif
871 %else
872 %ifarch %quadmath_arch
873 Requires: libquadmath47-32bit = %{version}-%{release}
874 %endif
875 Autoprov: no
876 %endif
877
878 %description -n libgfortran47-32bit
879 The runtime library needed to run programs compiled with the Fortran compiler
880 of the GNU Compiler Collection (GCC).
881
882 %post -n libgfortran47-32bit
883 /sbin/ldconfig
884
885 %postun -n libgfortran47-32bit
886 /sbin/ldconfig
887 # PACKAGE-END
888 # PACKAGE-BEGIN
889 # PACKAGE-BEGIN
890 %package -n libgfortran47-64bit
891 Summary:      The GNU Fortran Compiler Runtime Library
892 License:        GPL-3.0-with-GCC-exception
893 Group:        Development/Languages/Fortran
894 %if 0%{!?build_optional_compiler:1}
895 Provides: libgfortran3-64bit = %{version}-%{release}
896 Conflicts: libgfortran3-64bit < %{version}-%{release}
897 %ifarch %quadmath_arch
898 Requires: libquadmath0-64bit >= %{version}-%{release}
899 %endif
900 %else
901 %ifarch %quadmath_arch
902 Requires: libquadmath47-64bit = %{version}-%{release}
903 %endif
904 Autoprov: no
905 %endif
906
907 %description -n libgfortran47-64bit
908 The runtime library needed to run programs compiled with the Fortran compiler
909 of the GNU Compiler Collection (GCC).
910
911 %post -n libgfortran47-64bit
912 /sbin/ldconfig
913
914 %postun -n libgfortran47-64bit
915 /sbin/ldconfig
916 # PACKAGE-END
917
918 # PACKAGE-BEGIN
919 # PACKAGE-BEGIN
920 %package -n libquadmath47
921 Summary:      The GNU Fortran Compiler Quadmath Runtime Library
922 License:        LGPL-2.1
923 Group:        Development/Languages/Fortran
924 %if 0%{!?build_optional_compiler:1}
925 Provides: libquadmath0 = %{version}-%{release}
926 Conflicts: libquadmath0 < %{version}-%{release}
927 %else
928 Autoprov: no
929 %endif
930
931 %description -n libquadmath47
932 The runtime library needed to run programs compiled with the Fortran compiler
933 of the GNU Compiler Collection (GCC) and quadruple precision floating point
934 operations.
935
936 %post -n libquadmath47
937 /sbin/ldconfig
938
939 %postun -n libquadmath47
940 /sbin/ldconfig
941 # PACKAGE-END
942 # PACKAGE-BEGIN
943 # PACKAGE-BEGIN
944 %package -n libquadmath47-32bit
945 Summary:      The GNU Fortran Compiler Quadmath Runtime Library
946 License:        LGPL-2.1
947 Group:        Development/Languages/Fortran
948 %if 0%{!?build_optional_compiler:1}
949 Provides: libquadmath0-32bit = %{version}-%{release}
950 Conflicts: libquadmath0-32bit < %{version}-%{release}
951 %else
952 Autoprov: no
953 %endif
954
955 %description -n libquadmath47-32bit
956 The runtime library needed to run programs compiled with the Fortran compiler
957 of the GNU Compiler Collection (GCC) and quadruple precision floating point
958 operations.
959
960 %post -n libquadmath47-32bit
961 /sbin/ldconfig
962
963 %postun -n libquadmath47-32bit
964 /sbin/ldconfig
965 # PACKAGE-END
966 # PACKAGE-BEGIN
967 # PACKAGE-BEGIN
968 %package -n libquadmath47-64bit
969 Summary:      The GNU Fortran Compiler Quadmath Runtime Library
970 License:        LGPL-2.1
971 Group:        Development/Languages/Fortran
972 %if 0%{!?build_optional_compiler:1}
973 Provides: libquadmath0-64bit = %{version}-%{release}
974 Conflicts: libquadmath0-64bit < %{version}-%{release}
975 %else
976 Autoprov: no
977 %endif
978
979 %description -n libquadmath47-64bit
980 The runtime library needed to run programs compiled with the Fortran compiler
981 of the GNU Compiler Collection (GCC) and quadruple precision floating point
982 operations.
983
984 %post -n libquadmath47-64bit
985 /sbin/ldconfig
986
987 %postun -n libquadmath47-64bit
988 /sbin/ldconfig
989 # PACKAGE-END
990
991 # PACKAGE-BEGIN
992 # PACKAGE-BEGIN
993 %package -n libmudflap47
994 Summary:      The Mudflap Extension Runtime Library
995 License:        GPL-3.0-with-GCC-exception
996 Group:        Development/Languages/C and C++
997 Provides: libmudflap0 = %{version}-%{release}
998 Conflicts: libmudflap0 < %{version}-%{release}
999 Provides: libmudflapth0 = %{version}-%{release}
1000 Conflicts: libmudflapth0 < %{version}-%{release}
1001
1002 %description -n libmudflap47
1003 This is the Mudflap Extension Runtime Library.
1004
1005 %post -n libmudflap47
1006 /sbin/ldconfig
1007
1008 %postun -n libmudflap47
1009 /sbin/ldconfig
1010 # PACKAGE-END
1011 # PACKAGE-BEGIN
1012 # PACKAGE-BEGIN
1013 %package -n libmudflap47-32bit
1014 Summary:      The Mudflap Extension Runtime Library
1015 License:        GPL-3.0-with-GCC-exception
1016 Group:        Development/Languages/C and C++
1017 Provides: libmudflap0-32bit = %{version}-%{release}
1018 Conflicts: libmudflap0-32bit < %{version}-%{release}
1019 Provides: libmudflapth0-32bit = %{version}-%{release}
1020 Conflicts: libmudflapth0-32bit < %{version}-%{release}
1021
1022 %description -n libmudflap47-32bit
1023 This is the Mudflap Extension Runtime Library.
1024
1025 %post -n libmudflap47-32bit
1026 /sbin/ldconfig
1027
1028 %postun -n libmudflap47-32bit
1029 /sbin/ldconfig
1030 # PACKAGE-END
1031 # PACKAGE-BEGIN
1032 # PACKAGE-BEGIN
1033 %package -n libmudflap47-64bit
1034 Summary:      The Mudflap Extension Runtime Library
1035 License:        GPL-3.0-with-GCC-exception
1036 Group:        Development/Languages/C and C++
1037 Provides: libmudflap0-64bit = %{version}-%{release}
1038 Conflicts: libmudflap0-64bit < %{version}-%{release}
1039 Provides: libmudflapth0-64bit = %{version}-%{release}
1040 Conflicts: libmudflapth0-64bit < %{version}-%{release}
1041
1042 %description -n libmudflap47-64bit
1043 This is the Mudflap Extension Runtime Library.
1044
1045 %post -n libmudflap47-64bit
1046 /sbin/ldconfig
1047
1048 %postun -n libmudflap47-64bit
1049 /sbin/ldconfig
1050 # PACKAGE-END
1051
1052
1053 %package -n libgcj47
1054 # LIBJAVA-DELETE-END
1055 Summary:      Java Runtime Library for gcc
1056 License:      GPL-2.0-with-classpath-exception
1057 Group:        System/Libraries
1058 %define gcj_sover 13
1059 Provides: libgcj%{gcj_sover} = %{version}-%{release}
1060 Conflicts: libgcj%{gcj_sover} < %{version}-%{release}
1061 Provides: libgij%{gcj_sover} = %{version}-%{release}
1062 Conflicts: libgij%{gcj_sover} < %{version}-%{release}
1063 Provides: libgcj-tools%{gcj_sover} = %{version}-%{release}
1064 Conflicts: libgcj-tools%{gcj_sover} < %{version}-%{release}
1065
1066 %description -n libgcj47
1067 This library is needed if you want to use the GNU Java compiler, gcj.
1068 Source code for this package is in gcc.
1069
1070 %post -n libgcj47
1071 /sbin/ldconfig
1072
1073 %postun -n libgcj47
1074 /sbin/ldconfig
1075
1076
1077 %package -n gcc47-java
1078 Summary:      The GNU Java Compiler
1079 License:        GPL-3.0+
1080 Group:        Development/Languages/Java
1081 Requires: gcc47 = %{version}
1082 Requires: libgcj47-devel = %{version}-%{release}
1083
1084 %description -n gcc47-java
1085 The Java compiler from the GCC-tools-suite.
1086
1087
1088 %package -n libgcj_bc47
1089 Summary:      Fake library for BC-ABI compatibility.
1090 License:        GPL-2.0-with-classpath-exception
1091 Group:        Development/Libraries/Java
1092 Provides: libgcj_bc1 = %{version}-%{release}
1093 Conflicts: libgcj_bc1 < %{version}-%{release}
1094 # libgcj_bc is special in that it just contains a symlink to
1095 # a proper libgcj version.  So require that library and add
1096 # provides for the shlib version as created at link time
1097 Requires: libgcj%{gcj_sover}
1098 %ifarch x86_64 
1099 Provides: libgcj_bc.so.1()(64bit)
1100 %else
1101 Provides: libgcj_bc.so.1
1102 %endif
1103
1104
1105 %description -n libgcj_bc47
1106 A fake library that is used at link time only. It ensures that
1107 binaries built with the BC-ABI link against a constant SONAME.
1108 This way, BC-ABI binaries continue to work if the SONAME underlying
1109 libgcj.so changes.
1110
1111
1112 %package -n libgcj47-jar
1113 Summary:      Java runtime library (jar files).
1114 License:        GPL-2.0-with-classpath-exception
1115 Group:        Development/Libraries/Java
1116
1117 %description -n libgcj47-jar
1118 These are the jar files that go along with the gcj front end to gcc.
1119
1120
1121 %package -n libgcj47-devel
1122 Summary:      Include Files and Libraries mandatory for Development.
1123 License:        GPL-2.0-with-classpath-exception
1124 Group:        Development/Libraries/Java
1125 Requires: libstdc++47-devel = %{version}
1126 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
1127 Requires: libgcj_bc1 >= %{version}-%{release}
1128 Requires: libgcj47-jar = %{version}-%{release}
1129 Requires: gtk2-devel
1130 Requires: libart_lgpl-devel
1131 Requires: glibc-devel
1132 Requires: zlib-devel
1133
1134 %description -n libgcj47-devel
1135 This package contains all necessary include files and libraries needed
1136 to develop applications that require these.
1137
1138
1139 %package -n gcc47-gij
1140 Summary:      Java Bytecode Interpreter for gcc
1141 License:      GPL-2.0-with-classpath-exception
1142 Group:        Development/Libraries/Java
1143 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
1144
1145 %description -n gcc47-gij
1146 This package contains the java bytecode interpreter gij and related tools.
1147
1148 # LIBFFI-DELETE-END
1149 # PACKAGE-BEGIN
1150 # PACKAGE-BEGIN
1151 %package -n libffi47
1152 Summary:      Foreign Function Interface library
1153 License:        BSD-3-Clause
1154 Group:        Development/Languages/C and C++
1155 Provides: g-wrap:/usr/lib/libffi.so.4
1156 Provides: libffi4 = %{version}-%{release}
1157 Conflicts: libffi4 < %{version}-%{release}
1158
1159 %description -n libffi47
1160 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1161
1162 %post -n libffi47
1163 /sbin/ldconfig
1164
1165 %postun -n libffi47
1166 /sbin/ldconfig
1167 # PACKAGE-END
1168 # PACKAGE-BEGIN
1169 # PACKAGE-BEGIN
1170 %package -n libffi47-32bit
1171 Summary:      Foreign Function Interface library
1172 License:        BSD-3-Clause
1173 Group:        Development/Languages/C and C++
1174 Provides: g-wrap:/usr/lib/libffi.so.4
1175 Provides: libffi4-32bit = %{version}-%{release}
1176 Conflicts: libffi4-32bit < %{version}-%{release}
1177
1178 %description -n libffi47-32bit
1179 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1180
1181 %post -n libffi47-32bit
1182 /sbin/ldconfig
1183
1184 %postun -n libffi47-32bit
1185 /sbin/ldconfig
1186 # PACKAGE-END
1187 # PACKAGE-BEGIN
1188 # PACKAGE-BEGIN
1189 %package -n libffi47-64bit
1190 Summary:      Foreign Function Interface library
1191 License:        BSD-3-Clause
1192 Group:        Development/Languages/C and C++
1193 Provides: g-wrap:/usr/lib/libffi.so.4
1194 Provides: libffi4-64bit = %{version}-%{release}
1195 Conflicts: libffi4-64bit < %{version}-%{release}
1196
1197 %description -n libffi47-64bit
1198 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1199
1200 %post -n libffi47-64bit
1201 /sbin/ldconfig
1202
1203 %postun -n libffi47-64bit
1204 /sbin/ldconfig
1205 # PACKAGE-END
1206
1207 # PACKAGE-BEGIN
1208 # PACKAGE-BEGIN
1209 %package -n libffi47-devel
1210 Summary:      Foreign Function Interface library development files
1211 License:        BSD 3-Clause
1212 Group:        Development/Languages/C and C++
1213 Requires: libffi4 >= %{version}-%{release}
1214 Provides: libffi-devel = %{version}-%{release}
1215 Conflicts: libffi-devel < %{version}-%{release}
1216
1217 %description -n libffi47-devel
1218 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1219 # PACKAGE-END
1220 # PACKAGE-BEGIN
1221 # PACKAGE-BEGIN
1222 %package -n libffi47-devel-32bit
1223 Summary:      Foreign Function Interface library development files
1224 License:        BSD 3-Clause
1225 Group:        Development/Languages/C and C++
1226 Requires: libffi4-32bit >= %{version}-%{release}
1227 Provides: libffi-devel-32bit = %{version}-%{release}
1228 Conflicts: libffi-devel-32bit < %{version}-%{release}
1229
1230 %description -n libffi47-devel-32bit
1231 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1232 # PACKAGE-END
1233 # PACKAGE-BEGIN
1234 # PACKAGE-BEGIN
1235 %package -n libffi47-devel-64bit
1236 Summary:      Foreign Function Interface library development files
1237 License:        BSD 3-Clause
1238 Group:        Development/Languages/C and C++
1239 Requires: libffi4-64bit >= %{version}-%{release}
1240 Provides: libffi-devel-64bit = %{version}-%{release}
1241 Conflicts: libffi-devel-64bit < %{version}-%{release}
1242
1243 %description -n libffi47-devel-64bit
1244 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
1245 # PACKAGE-END
1246
1247 %package -n gcc47-testresults
1248 # GCC-TESTSUITE-DELETE-END
1249 Summary:      Testsuite results
1250 License:        Public-Domain
1251 Group:        Development/Languages/C and C++
1252
1253 %description -n gcc47-testresults
1254 Results from running the gcc and target library testsuites.
1255
1256
1257 # COMMON-BEGIN
1258
1259 # Define the canonical target and host architecture
1260 #   %gcc_target_arch  is supposed to be the full target triple
1261 #   %TARGET_ARCH      is the canonicalized CPU part
1262 #   %CONFIGURE_TARGET is the target triple used for --target=
1263 %if 0%{?gcc_target_arch:1}
1264 %define CONFIGURE_TARGET %{gcc_target_arch}
1265 %define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
1266 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
1267 %define CONFIGURE_TARGET i586-tizen-linux
1268 %endif
1269 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
1270 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
1271 %endif
1272 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
1273 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
1274 %endif
1275 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
1276 %define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
1277 %endif
1278 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
1279 %define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
1280 %endif
1281 %else
1282 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
1283 %endif
1284 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
1285
1286 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
1287
1288 %ifarch %arm
1289 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
1290 %else
1291 %define GCCDIST %{HOST_ARCH}-tizen-linux
1292 %endif
1293
1294 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
1295 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
1296
1297 # COMMON-END
1298
1299 # Versionspecific directories
1300 %define versmainlibdir %{libsubdir}
1301 %define versmainlibdirbi32 %{libsubdir}/32
1302 %define versmainlibdirbi64 %{libsubdir}/64
1303 %if %{build_primary_64bit}
1304 %define versmainlibdirbi %{versmainlibdirbi32}
1305 %else
1306 %define versmainlibdirbi %{versmainlibdirbi64}
1307 %endif
1308
1309 %if 0%{?build_optional_compiler:1}
1310 %define mainlibdir %{versmainlibdir}
1311 %define mainlibdirbi32 %{versmainlibdirbi32}
1312 %define mainlibdirbi64 %{versmainlibdirbi64}
1313 %define noflibdir %{versnoflibdir}
1314 %define mainlibdirbi %{versmainlibdirbi}
1315 %else
1316 %define mainlibdir %{_libdir}
1317 %define mainlibdirbi32 %{_prefix}/lib
1318 %define mainlibdirbi64 %{_prefix}/lib64
1319 %define noflibdir %{_prefix}/lib/nof
1320 %if %{build_primary_64bit}
1321 %define mainlibdirbi %{mainlibdirbi32}
1322 %else
1323 %define mainlibdirbi %{mainlibdirbi64}
1324 %endif
1325 %endif
1326
1327
1328 # Now define a few macros that make it easy to package libs and
1329 # related files just to the right package, without caring for the
1330 # exact path the files are in.
1331 #   %mainlib  package X from all dirs that belong to the main package
1332 #   %biarchlib   package X from all dirs that belong to the -32/64bit package
1333 # by default, nof libs go where the 32bit libs go.
1334 %if %{build_nof}
1335 %define mainlib() %{mainlibdir}/%1\
1336 %{noflibdir}/%1\
1337 %{nil}
1338 %else
1339 %define mainlib() %{mainlibdir}/%1\
1340 %{nil}
1341 %endif
1342 %define biarchlib() %{nil}
1343 %if %{biarch}
1344 %if !%{separate_biarch}
1345 %if %{build_nof}
1346 %define mainlib() %{mainlibdir}/%1\
1347 %{mainlibdirbi}/%1\
1348 %{noflibdir}/%1\
1349 %{nil}
1350 %else
1351 %define mainlib() %{mainlibdir}/%1\
1352 %{mainlibdirbi}/%1\
1353 %{nil}
1354 %endif
1355 %else
1356 %if %{build_nof}
1357 %define biarchlib() %{mainlibdirbi}/%1\
1358 %{noflibdir}/%1\
1359 %{nil}
1360 %define mainlib() %{mainlibdir}/%1\
1361 %{nil}
1362 %else
1363 %define biarchlib() %{mainlibdirbi}/%1\
1364 %{nil}
1365 %endif
1366 %endif
1367 %endif
1368
1369 %if %{build_nof}
1370 %define versmainlib() %{versmainlibdir}/%1\
1371 %{versnoflibdir}/%1\
1372 %{nil}
1373 %else
1374 %define versmainlib() %{versmainlibdir}/%1\
1375 %{nil}
1376 %endif
1377 %define versbiarchlib() %{nil}
1378 %if %{biarch}
1379 %if !%{separate_biarch}
1380 %if %{build_nof}
1381 %define versmainlib() %{versmainlibdir}/%1\
1382 %{versmainlibdirbi}/%1\
1383 %{versnoflibdir}/%1\
1384 %{nil}
1385 %else
1386 %define versmainlib() %{versmainlibdir}/%1\
1387 %{versmainlibdirbi}/%1\
1388 %{nil}
1389 %endif
1390 %else
1391 %if %{build_nof}
1392 %define versbiarchlib() %{versmainlibdirbi}/%1\
1393 %{versnoflibdir}/%1\
1394 %{nil}
1395 %define versmainlib() %{versmainlibdir}/%1\
1396 %{nil}
1397 %else
1398 %define versbiarchlib() %{versmainlibdirbi}/%1\
1399 %{nil}
1400 %endif
1401 %endif
1402 %endif
1403
1404
1405 # COMMON-BEGIN
1406
1407 %prep
1408 #%setup -q -n gcc-%{gcc_version}%{snapshot_date}
1409 %setup -q -n gcc-%{version}
1410 # 0001-dir-version.patch
1411 %patch0 -p1
1412 %patch1 -p1
1413 %patch2 -p1
1414 %patch3 -p1
1415
1416 %build
1417 # Avoid rebuilding of generated files
1418 contrib/gcc_update --touch
1419 # Avoid fucking up testsuite results with Java and indirect dispatch
1420 export LD_AS_NEEDED=0
1421 # Split version file into version used for directories (X.Y) and
1422 # version to report with --version (X.Y.Z).
1423 # See also gcc-dir-version.patch.
1424 # Also decrement the patchlevel version by one
1425 if test `cat gcc/DEV-PHASE` == "prerelease"; then
1426   ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
1427 else
1428   mv gcc/BASE-VER gcc/FULL-VER
1429 fi
1430 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
1431
1432 rm -rf obj-%{GCCDIST}
1433 mkdir obj-%{GCCDIST}
1434 cd obj-%{GCCDIST}
1435 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
1436 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
1437 %ifarch %ix86
1438 # -mcpu is superceded by -mtune but -mtune is not supported by
1439 # our bootstrap compiler.  -mcpu gives a warning that stops
1440 # the build process, so remove it for now.  Also remove all other
1441 # -march and -mtune flags.  They are superseeded by proper
1442 # default compiler settings now.
1443 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
1444 %endif
1445 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
1446 # Kill all -march/tune/cpu because that screws building the target libs
1447 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
1448 %endif
1449 # Replace 2 spaces by one finally
1450 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
1451
1452 languages=c
1453 %if %{build_cp}
1454 languages=$languages,c++
1455 %endif
1456 %if %{build_objc}
1457 languages=$languages,objc
1458 %endif
1459 %if %{build_fortran}
1460 languages=$languages,fortran
1461 %endif
1462 %if %{build_objcp}
1463 languages=$languages,obj-c++
1464 %endif
1465 %if %{build_java}
1466 languages=$languages,java
1467 %endif
1468 %if %{build_ada}
1469 languages=$languages,ada
1470 %endif
1471
1472 J=%{?jobs:%jobs}
1473 if test -z "$J"; then
1474   J=$(getconf _NPROCESSORS_CONF)
1475   JL=$(($J * 2))
1476 else
1477   test 1 -gt "$J" && J=1
1478   JL=$(($(getconf _NPROCESSORS_CONF)*2))
1479 fi
1480 if test "$J" == "0"; then
1481   J=1
1482 fi
1483 if test "$JL" == "0"; then
1484   JL=1
1485 fi
1486 PARALLEL="-j$J -l$JL"
1487
1488 # we don't want some miscompiles in the testsuite, or some fault in
1489 # the compiler to kill the machine.  Hence we limit the amount of memory
1490 # by the physical RAM plus half of swap
1491 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
1492 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
1493 #ulimit -v $(((MEM + SWAP/2)*1024))
1494
1495 # In general we want to ship release checking enabled compilers
1496 # and run BETA with checking enabled.
1497 #ENABLE_CHECKING="--enable-checking=yes"
1498 ENABLE_CHECKING="--enable-checking=release"
1499
1500 # Work around tail/head -1 changes
1501 export _POSIX2_VERSION=199209
1502
1503 # configure tries to parse include/features.h to detect
1504 # if glibc supports SSP.  When cross compiling we would need
1505 # to install a cross glibc, which we don't, or make the whole
1506 # thing point to the native glibc, which is in /, hence the
1507 # --with-sysroot=/
1508
1509 %if %{build_ada}
1510 # Using the host gnatmake like
1511 #   CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
1512 #   GNATMAKE="gnatmake%{hostsuffix}"
1513 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
1514 # available
1515 mkdir -p host-tools/bin
1516 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
1517 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
1518 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
1519 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
1520 ln -sf /usr/%{_lib} host-tools/%{_lib}
1521 export PATH="`pwd`/host-tools/bin:$PATH"
1522 %endif
1523 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
1524 #%else
1525 #       --enable-threads=posix \
1526 #%endif
1527 #       --enable-shared \
1528 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
1529 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
1530 ../configure \
1531         --prefix=%{_prefix} \
1532         --infodir=%{_infodir} \
1533         --mandir=%{_mandir} \
1534         --libdir=%{_libdir} \
1535         --libexecdir=%{_libdir} \
1536         --enable-languages=$languages \
1537         $ENABLE_CHECKING \
1538         --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
1539         --enable-ssp \
1540         --disable-libssp \
1541         --disable-libitm \
1542 %if 0%{?fast_build}
1543         --disable-bootstrap \
1544 %endif
1545         --disable-plugin \
1546         --with-bugurl="http://bugs.tizen.org/" \
1547         --with-pkgversion="Tizen Linux" \
1548 %if !%{build_libjava}
1549         --disable-libgcj \
1550 %else
1551         --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
1552         --with-ecj-jar=%{libsubdir}/ecj.jar \
1553         --disable-java-awt \
1554 %if !%{biarch_libjava}
1555         --disable-libjava-multilib \
1556 %endif
1557 %endif
1558 %if !%{build_with_mudflap}
1559         --disable-libmudflap \
1560 %endif
1561         --with-slibdir=/%{_lib} \
1562         --with-system-zlib \
1563         --enable-__cxa_atexit \
1564         --enable-libstdcxx-allocator=new \
1565         --disable-libstdcxx-pch \
1566         --enable-version-specific-runtime-libs \
1567         --enable-linker-build-id \
1568 %if 0%{?gcc_target_arch:1}
1569 %if 0%{?gcc_icecream:1}
1570         --with-build-sysroot=/ \
1571         --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
1572         --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
1573         --enable-linux-futex \
1574 %endif
1575 %if 0%{?canonical_target:1}
1576         --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
1577 %endif
1578 %if 0%{?build_static:1}
1579         --disable-shared \
1580 %endif
1581 %if "%{TARGET_ARCH}" == "spu"
1582         --with-sysroot=/usr/spu \
1583         --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
1584         --with-newlib \
1585 %endif
1586         --disable-nls \
1587         --target=%{CONFIGURE_TARGET} \
1588 %else
1589         --program-suffix=%{binsuffix} \
1590         --enable-linux-futex \
1591         --without-system-libunwind \
1592 %endif
1593 %if "%{TARGET_ARCH}" == "armv5tel"
1594         --with-arch=armv5te \
1595         --with-float=soft \
1596         --with-mode=arm \
1597         --with-abi=aapcs-linux \
1598         --disable-sjlj-exceptions \
1599 %endif
1600 %if "%{TARGET_ARCH}" == "armv7el" 
1601         --with-arch=armv7-a \
1602         --with-tune=cortex-a9 \
1603         --with-float=soft \
1604         --with-abi=softfp \
1605         --with-fpu=vfpv3 \
1606         --disable-sjlj-exceptions \
1607 %endif
1608 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
1609         --with-arch=armv7-a \
1610         --with-tune=cortex-a9 \
1611         --with-float=hard \
1612         --with-abi=aapcs-linux \
1613         --with-fpu=vfpv3-d16 \
1614         --disable-sjlj-exceptions \
1615 %endif
1616 %if "%{TARGET_ARCH}" == "i586"
1617         --with-arch-32=i586 \
1618         --with-tune=generic \
1619 %endif
1620 %if "%{TARGET_ARCH}" == "x86_64"
1621         --with-arch-32=i586 \
1622         --with-tune=generic \
1623 %endif
1624         --build=%{GCCDIST}
1625
1626 # COMMON-END
1627
1628 %if 0%{?building_libffi:1}
1629 make stage1-bubble $PARALLEL
1630 make all-target-libffi $PARALLEL
1631 %else
1632 # Only run profiled bootstrap on archs where it works
1633 #%ifarch %ix86 x86_64 
1634 #make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1635 #%else
1636 %ifarch %arm
1637 STAGE1_FLAGS="-O0"
1638 %else
1639 STAGE1_FLAGS="-O -g"
1640 %endif
1641 #make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1642 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1643 #%endif
1644 #make -C gcc proto
1645 make info
1646 %if 0%{?run_tests:1}
1647 echo "Run testsuite"
1648 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
1649 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
1650 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
1651 make -k check $PARALLEL || true
1652 mkdir ../testresults
1653 ../contrib/test_summary | tee ../testresults/test_summary.txt
1654 %endif
1655 %endif
1656
1657 %install
1658 export NO_BRP_CHECK_BYTECODE_VERSION=true
1659 cd obj-%{GCCDIST}
1660 # GCC-TESTSUITE-DELETE-BEGIN
1661 # Work around tail/head -1 changes
1662 export _POSIX2_VERSION=199209
1663 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
1664 %if 0%{?building_libffi:1}
1665 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
1666 %else
1667 %if 0%{?building_libjava:1}
1668 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
1669 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
1670 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
1671 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
1672 # install-common also installs collect2, gcov and the g++ and gfortran driver
1673 %if %{build_cp}
1674 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
1675 %endif
1676 %if %{build_fortran}
1677 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
1678 %endif
1679 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
1680 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
1681 %else
1682 make install DESTDIR=$RPM_BUILD_ROOT
1683 %if %{build_java}
1684 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
1685 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
1686 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
1687 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
1688 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
1689 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
1690 %endif
1691 %endif
1692 %endif
1693
1694 # Remove libffi installed files if we did not want to build it
1695 %if !0%{?building_libffi:1}
1696 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
1697 %if %{biarch}
1698   rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
1699 %endif
1700 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
1701 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
1702 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
1703 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
1704 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
1705 %endif
1706
1707 # Remove some useless .la files
1708 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
1709     libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
1710   rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
1711 %if %{biarch}
1712   rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
1713 %endif
1714 done
1715
1716 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1717 %if %{biarch}
1718 %if %{build_primary_64bit}
1719 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
1720 %else
1721 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
1722 %endif
1723 %endif
1724
1725 # LIBFFI-DELETE-BEGIN
1726 # LIBJAVA-DELETE-BEGIN
1727 %if %{build_cp}
1728 # Merge multilib c++config.h to allow omitting the duplicate and
1729 # identical other arch specific headers
1730 dir_ml=
1731 cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`"
1732 for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
1733   if ! diff -up $cxxconfig $i; then
1734     file_32=x
1735     file_64=x
1736     case $i in
1737       %{GCCDIST}/32/*)
1738         file_32=$i
1739         file_64=$cxxconfig
1740         dir_ml=32
1741         ;;
1742       %{GCCDIST}/64/*)
1743         file_32=$cxxconfig
1744         file_64=$i
1745         dir_ml=64
1746         ;;
1747     esac
1748     if ! ( test -f "$file_32" && test -f "$file_64" ); then
1749       echo "Urgs?"
1750       exit 1
1751     fi
1752     
1753     cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
1754 #ifndef _CPP_CPPCONFIG_WRAPPER
1755 #define _CPP_CPPCONFIG_WRAPPER 1
1756 #include <bits/wordsize.h>
1757 #if __WORDSIZE == 32
1758 `cat $file_32`
1759 #else
1760 `cat $file_64`
1761 #endif
1762 #endif
1763 EOF
1764     break
1765   fi
1766 done
1767 rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]*
1768 if ! test -z "$dir_ml"; then
1769   ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml
1770 fi
1771 %endif
1772 # LIBJAVA-DELETE-END
1773
1774 %if 0%{!?build_optional_compiler:1}
1775 # move shared libs from versionspecific dir to main libdir
1776 for libname in \
1777 %if 0%{?building_libjava:1}
1778   libgcj libgij libgcj-tools \
1779 %else
1780 %if %{build_fortran}
1781   libgfortran \
1782 %ifarch %quadmath_arch
1783   libquadmath \
1784 %endif
1785 %endif
1786 %if %{build_objc}
1787   libobjc \
1788 %endif
1789 %if %{build_cp}
1790   libstdc++ \
1791 %endif
1792   libgomp \
1793 %if %{build_with_mudflap}
1794   libmudflap libmudflapth \
1795 %endif
1796 %endif
1797     ; do
1798   for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
1799     mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
1800   done
1801   ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1802          $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
1803 %if %{biarch}
1804   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1805     for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
1806       mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
1807     done
1808     ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1809          $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
1810   fi
1811 %endif
1812 done
1813 %if %{build_cp}
1814 %if !0%{?building_libjava:1}
1815 # And we want to move the shlib gdb pretty printers to a more sane
1816 # place so ldconfig does not complain
1817 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
1818 mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
1819 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
1820 %if %{biarch}
1821   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1822     mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
1823     mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
1824     sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
1825   fi
1826 %endif
1827 %endif
1828 %endif
1829 %if 0%{?building_libjava:1}
1830 # libgcj_bc is special as the .so file is actually a different
1831 # library as the library refered to by the SONAME which should
1832 # be a simple link to our libgcj.
1833 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
1834   rm $lib
1835 done
1836 ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.1
1837 %if %{biarch_libjava}
1838 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
1839   rm $lib
1840 done
1841 ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.1
1842 %endif
1843 %endif
1844 %endif
1845
1846 # LIBJAVA-DELETE-BEGIN
1847 %if 0%{!?build_optional_compiler:1}
1848 # Move libgcc_s around
1849 if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
1850   rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
1851   ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
1852 else
1853   mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
1854 fi
1855 chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s}
1856 %if %{biarch}
1857 %if %{build_primary_64bit}
1858 if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
1859   rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
1860   ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
1861 else
1862   mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
1863 fi
1864 ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
1865 chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s}
1866 %else
1867 # 32-bit biarch systems
1868 if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
1869   rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
1870   ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
1871 else
1872   mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
1873 fi
1874 ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
1875 chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s}
1876 %endif
1877 %endif
1878 %else
1879 # Move libgcc_s around
1880 mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/
1881 if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
1882   rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
1883   ln -sf %{versmainlibdir}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
1884 else
1885   mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
1886 fi
1887 chmod a+x $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
1888 %if %{biarch}
1889 %if %{build_primary_64bit}
1890 mv $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/
1891 if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
1892   rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
1893   ln -sf %{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
1894 else
1895   mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
1896 fi
1897 ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
1898 chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
1899 %else
1900 # 32-bit biarch systems
1901 mv $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/
1902 if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
1903   rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
1904   ln -sf %{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
1905 else
1906   mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
1907 fi
1908 ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
1909 chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
1910 %endif
1911 %endif
1912 %endif
1913
1914 # Provide a defaults.spec file which adds a proper rpath
1915 %if 0%{?build_optional_compiler:1}
1916 cat > $RPM_BUILD_ROOT%{libsubdir}/defaults.spec << EOF
1917 *link:
1918 + %%{!m32:%%{!m64:-rpath=%{libsubdir}}} %%{m32:-rpath=%{libsubdir}/32} %%{m64:-rpath=%{libsubdir}/64}
1919 EOF
1920 %endif
1921 # LIBJAVA-DELETE-END
1922 # LIBFFI-DELETE-END
1923
1924 %if %{build_ada}
1925 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
1926 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
1927 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
1928 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
1929 %if %{biarch}
1930 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
1931 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1932 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1933 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
1934 %endif
1935 %endif
1936
1937 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
1938
1939 # Remove some crap from the .la files:
1940 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
1941   echo "changing $l"
1942 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
1943   sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
1944       -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
1945       -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
1946       -e '/^dependency_libs/s|-L[^ ]* ||g' \
1947 %if %{biarch}
1948 %if %{build_primary_64bit}
1949       -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
1950       -e '/^libdir/s|lib64/\.\./||' \
1951 %else
1952       -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
1953 %endif
1954 %endif
1955       < $l  > $l.new
1956   mv $l.new $l
1957 done
1958
1959 # GCC-TESTSUITE-DELETE-END
1960 %if 0%{?run_tests:1} 
1961 cp `find . -name "*.sum"` ../testresults/
1962 cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
1963 chmod 644 ../testresults/*
1964 %endif
1965 # GCC-TESTSUITE-DELETE-BEGIN
1966 # LIBFFI-DELETE-BEGIN
1967 %if %{build_cp}
1968 # Find C++ and Java headers
1969 find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
1970   -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
1971   -o \( -type d -printf "%%%%dir " , \
1972         -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
1973 %endif
1974 # LIBFFI-DELETE-END
1975 # Remove files that we do not need to clean up filelist
1976 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
1977 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
1978 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1979 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
1980 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
1981 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
1982 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
1983 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
1984 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
1985 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
1986 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
1987 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
1988 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
1989 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1990 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
1991 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
1992 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
1993 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1994 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
1995 # no plugins
1996 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
1997 rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
1998 rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
1999
2000 %if !0%{?building_libjava:1}%{?building_libffi:1}
2001 # delete compile flag tracking from crt files
2002 crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
2003 %if %{biarch}
2004 %if %{build_primary_64bit}
2005 crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
2006 %else
2007 crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
2008 %endif
2009 %endif
2010 %endif
2011
2012 %if 0%{?building_libjava:1}
2013 # gcj -static doesn't work properly anyway, unless using --whole-archive
2014 # let's save the space instead.
2015 find $RPM_BUILD_ROOT -name libgcj.a \
2016         -o -name libgcj-tools.a \
2017         -o -name libgij.a \
2018         -o -name libjvm.a \
2019         -o -name libgcj_bc.a \
2020   | xargs rm -f
2021
2022 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
2023   sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
2024
2025 # security files have broken install locations, also they cause conflicts
2026 # between libgcj versions.  Simply delete them here, libgcj will use its
2027 # defaults in this case (which is what these files contain anyway).
2028 rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
2029 rm -r $RPM_BUILD_ROOT%{_libdir}/security
2030 %endif
2031
2032 %if 0%{?building_libffi:1}
2033 # Move libffi headers, remove empty libffi libtool file
2034 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
2035 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
2036 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
2037 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
2038 %if %{biarch}
2039 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
2040 %endif
2041 # Generate a simple pkg-config file
2042 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
2043 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
2044 %endif
2045
2046 %if %{build_java}
2047 %if !%{build_libjava}
2048 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
2049 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
2050 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
2051 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
2052 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
2053 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
2054 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
2055 %endif
2056 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
2057 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
2058 %endif
2059 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
2060 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
2061 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
2062 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
2063 %if %{build_nof}
2064 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
2065 %endif
2066 %if %{biarch}
2067 %if %{build_primary_64bit}
2068 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
2069 %else
2070 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
2071 %endif
2072 %endif
2073 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
2074 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
2075
2076 # LIBFFI-DELETE-BEGIN
2077 %if 0%{?building_libjava:1}
2078 # For building libjava only we need to delete other info docs
2079 rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
2080 # Remove stale manpages for binaries we do not build
2081 rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
2082 # For building the java frontend we need to copy the ecj jar
2083 mkdir -p $RPM_BUILD_ROOT%{libsubdir}
2084 cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
2085 %else
2086 # For regular build, some info files do not get renamed properly.
2087 # Do so here.
2088 mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
2089 %if %{build_fortran} 
2090 %ifarch %quadmath_arch
2091 mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
2092 %endif
2093 %endif
2094 %if %{build_ada}
2095 mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
2096 mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
2097 mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
2098 %endif
2099 %endif
2100
2101 # LIBJAVA-DELETE-BEGIN
2102 cd ..
2103 %find_lang gcc47-locale --all-name
2104
2105 %post info
2106 %install_info --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
2107 %install_info --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
2108 %install_info --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
2109 %install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
2110 %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
2111 %install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
2112 %if %{build_fortran} 
2113 %install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
2114 %ifarch %quadmath_arch
2115 %install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
2116 %endif
2117 %endif
2118 %if %{build_java}
2119 %install_info --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
2120 %endif
2121 %if %{build_ada}
2122 %install_info --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
2123 %install_info --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
2124 %install_info --info-dir=%{_infodir} --section="GNU Ada tools" --entry="* GNAT User's Guide: (gnat_ugn). GNAT User's Guide for Unix Platforms" %{_infodir}/gnat_ugn%{binsuffix}.info.gz
2125 %endif
2126
2127 %postun info
2128 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
2129 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
2130 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
2131 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
2132 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
2133 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
2134 %if %{build_fortran}
2135 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
2136 %ifarch %quadmath_arch
2137 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
2138 %endif
2139 %endif
2140 %if %{build_java}
2141 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
2142 %endif
2143 %if %{build_ada}
2144 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
2145 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
2146 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
2147 %endif
2148
2149
2150 %files
2151 %defattr(-,root,root)
2152 %dir %{_libdir}/gcc
2153 %dir %{_libdir}/gcc/%{GCCDIST}
2154 %dir %{libsubdir}
2155 %dir %{libsubdir}/include
2156 %dir %{libsubdir}/include-fixed
2157 %if %{biarch}
2158 %if %{build_primary_64bit}
2159 %dir %{libsubdir}/32
2160 %else
2161 %dir %{libsubdir}/64
2162 %endif
2163 %endif
2164 %if %{build_nof}
2165 %dir %{libsubdir}/nof
2166 %endif
2167 %{_prefix}/bin/gcc%{binsuffix}
2168 %{_prefix}/bin/gcov%{binsuffix}
2169 %{_prefix}/bin/gcc-ar%{binsuffix}
2170 %{_prefix}/bin/gcc-nm%{binsuffix}
2171 %{_prefix}/bin/gcc-ranlib%{binsuffix}
2172 %{libsubdir}/collect2
2173 %{libsubdir}/lto1
2174 %{libsubdir}/lto-wrapper
2175 %{libsubdir}/liblto_plugin.so*
2176 %{libsubdir}/include-fixed/README
2177 %{libsubdir}/include-fixed/limits.h
2178 %{libsubdir}/include-fixed/syslimits.h
2179 %{libsubdir}/include/omp.h
2180 %{libsubdir}/include/float.h
2181 %{libsubdir}/include/iso646.h
2182 %{libsubdir}/include/stdarg.h
2183 %{libsubdir}/include/stdbool.h
2184 %{libsubdir}/include/stdfix.h
2185 %{libsubdir}/include/stddef.h
2186 %{libsubdir}/include/unwind.h
2187 %{libsubdir}/include/varargs.h
2188 %{libsubdir}/include/stdint.h
2189 %{libsubdir}/include/stdint-gcc.h
2190 %{libsubdir}/include/stdnoreturn.h
2191 %{libsubdir}/include/stdalign.h
2192 %ifarch %arm
2193 %{libsubdir}/include/mmintrin.h
2194 %{libsubdir}/include/arm_neon.h
2195 %{libsubdir}/include/unwind-arm-common.h
2196 %endif
2197 %ifarch %ix86 x86_64
2198 %{libsubdir}/include/cross-stdarg.h
2199 %{libsubdir}/include/cpuid.h
2200 %{libsubdir}/include/mm3dnow.h
2201 %{libsubdir}/include/mmintrin.h
2202 %{libsubdir}/include/ammintrin.h
2203 %{libsubdir}/include/bmmintrin.h
2204 %{libsubdir}/include/emmintrin.h
2205 %{libsubdir}/include/immintrin.h
2206 %{libsubdir}/include/avxintrin.h
2207 %{libsubdir}/include/pmmintrin.h
2208 %{libsubdir}/include/xmmintrin.h
2209 %{libsubdir}/include/tmmintrin.h
2210 %{libsubdir}/include/nmmintrin.h
2211 %{libsubdir}/include/smmintrin.h
2212 %{libsubdir}/include/wmmintrin.h
2213 %{libsubdir}/include/x86intrin.h
2214 %{libsubdir}/include/ia32intrin.h
2215 %{libsubdir}/include/mm_malloc.h
2216 %{libsubdir}/include/fma4intrin.h
2217 %{libsubdir}/include/xopintrin.h
2218 %{libsubdir}/include/lwpintrin.h
2219 %{libsubdir}/include/popcntintrin.h
2220 %{libsubdir}/include/bmiintrin.h
2221 %{libsubdir}/include/tbmintrin.h
2222 %{libsubdir}/include/avx2intrin.h
2223 %{libsubdir}/include/bmi2intrin.h
2224 %{libsubdir}/include/fmaintrin.h
2225 %{libsubdir}/include/lzcntintrin.h
2226 %{libsubdir}/include/f16cintrin.h
2227 %endif
2228 %if %{build_with_mudflap}
2229 %{libsubdir}/include/mf-runtime.h
2230 %endif
2231 %versmainlib *crt*.o
2232 %versmainlib libgcc*.a
2233 %versmainlib libgcov.a
2234 %versmainlib libgcc_s*.so
2235 %if %{build_with_mudflap}
2236 %versmainlib libmudflap.a
2237 %versmainlib libmudflap.so
2238 %versmainlib libmudflapth.a
2239 %versmainlib libmudflapth.so
2240 %endif
2241 %versmainlib libgomp.so
2242 %versmainlib libgomp.a
2243 %versmainlib libgomp.spec
2244 %doc %{_mandir}/man1/gcc%{binsuffix}.1.gz
2245 %doc %{_mandir}/man1/gcov%{binsuffix}.1.gz
2246 %if 0%{?build_optional_compiler:1}
2247 %{libsubdir}/defaults.spec
2248 %endif
2249
2250 %if %{separate_biarch}
2251 %files -n gcc47%{separate_biarch_suffix}
2252 %defattr(-,root,root)
2253 %versbiarchlib *crt*.o
2254 %versbiarchlib libgcc*.a
2255 %versbiarchlib libgcov.a
2256 %versbiarchlib libgcc_s*.so
2257 %if %{build_with_mudflap}
2258 %versbiarchlib libmudflap.a
2259 %versbiarchlib libmudflap.so
2260 %versbiarchlib libmudflapth.a
2261 %versbiarchlib libmudflapth.so
2262 %endif
2263 %versbiarchlib libgomp.so
2264 %versbiarchlib libgomp.a
2265 %versbiarchlib libgomp.spec
2266 %endif
2267
2268 %files locale -f gcc47-locale.lang
2269
2270 %if %{build_cp}
2271 %files c++
2272 %defattr(-,root,root)
2273 %dir %{_libdir}/gcc
2274 %dir %{_libdir}/gcc/%{GCCDIST}
2275 %dir %{libsubdir}
2276 %{_prefix}/bin/g++%{binsuffix}
2277 %doc %{_mandir}/man1/g++%{binsuffix}.1.gz
2278 %{libsubdir}/cc1plus
2279
2280 %files -n libstdc++47
2281 %defattr(-,root,root)
2282 %if %{build_nof}
2283 %dir %{noflibdir}
2284 %endif
2285 %mainlib libstdc++.so.*
2286
2287 %if %{separate_biarch}
2288 %files -n libstdc++47%{separate_biarch_suffix}
2289 %defattr(-,root,root)
2290 %biarchlib libstdc++.so.*
2291 %endif
2292
2293 %files -n libstdc++47-devel -f c++-headers
2294 %defattr(-,root,root)
2295 %versmainlib libstdc++.a
2296 %versmainlib libstdc++.so
2297 %versmainlib libsupc++.a
2298 %dir %{_datadir}/gdb
2299 %dir %{_datadir}/gdb/auto-load
2300 %dir %{_datadir}/gdb/auto-load%{_prefix}
2301 %dir %{_datadir}/gdb/auto-load/%{mainlibdir}
2302 %{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py
2303 %{_datadir}/gcc%{binsuffix}
2304
2305 %if %{separate_biarch}
2306 %files -n libstdc++47-devel%{separate_biarch_suffix}
2307 %defattr(-,root,root)
2308 %versbiarchlib libstdc++.a
2309 %versbiarchlib libstdc++.so
2310 %versbiarchlib libsupc++.a
2311 %dir %{_datadir}/gdb/auto-load/%{mainlibdirbi}
2312 %{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py
2313 %endif
2314
2315 %files -n libstdc++47-doc
2316 %defattr(-,root,root)
2317 %doc libstdc++-v3/doc/html
2318 %endif
2319
2320 %files -n libgcc47
2321 %defattr(-,root,root)
2322 %if 0%{!?build_optional_compiler:1}
2323 /%{_lib}/libgcc_s.so.%{libgcc_s}
2324 %if %{build_nof}
2325 %dir /lib/nof
2326 /lib/nof/libgcc_s.so.%{libgcc_s}
2327 %endif
2328 %if %{biarch}
2329 %if %{build_primary_64bit}
2330 %if !%{separate_bi32}
2331 /lib/libgcc_s.so.%{libgcc_s}
2332 %endif
2333 %else
2334 %if !%{separate_bi64}
2335 /lib64/libgcc_s.so.%{libgcc_s}
2336 %endif
2337 %endif
2338 %endif
2339 %else
2340 %versmainlib libgcc_s.so.%{libgcc_s}
2341 %endif
2342
2343 %if %{separate_bi64}
2344 %files -n libgcc47-64bit
2345 %defattr(-,root,root)
2346 %if 0%{!?build_optional_compiler:1}
2347 /lib64/libgcc_s.so.%{libgcc_s}
2348 %else
2349 %versbiarchlib libgcc_s.so.%{libgcc_s}
2350 %endif
2351 %endif
2352
2353 %if %{separate_bi32}
2354 %files -n libgcc47-32bit
2355 %defattr(-,root,root)
2356 %if 0%{!?build_optional_compiler:1}
2357 /lib/libgcc_s.so.%{libgcc_s}
2358 %else
2359 %versbiarchlib libgcc_s.so.%{libgcc_s}
2360 %endif
2361 %endif
2362
2363
2364 %files -n libgomp47
2365 %defattr(-,root,root)
2366 %mainlib libgomp.so.1*
2367
2368 %if %{separate_biarch}
2369 %files -n libgomp47%{separate_biarch_suffix}
2370 %defattr(-,root,root)
2371 %biarchlib libgomp.so.1*
2372 %endif
2373
2374
2375 %if %{build_fortran}
2376 %files fortran
2377 %defattr(-,root,root)
2378 %dir %{libsubdir}/finclude
2379 %{_prefix}/bin/gfortran%{binsuffix}
2380 %{libsubdir}/f951
2381 %{libsubdir}/finclude/*
2382 %versmainlib libgfortran.a
2383 %versmainlib libgfortran.so
2384 %versmainlib libgfortran.spec
2385 %versmainlib libgfortranbegin.a
2386 %versmainlib libcaf_single.a
2387 %ifarch %quadmath_arch
2388 %{libsubdir}/include/quadmath.h
2389 %{libsubdir}/include/quadmath_weak.h
2390 %versmainlib libquadmath.a
2391 %versmainlib libquadmath.so
2392 %endif
2393 %doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz
2394
2395 %if %{separate_biarch}
2396 %files fortran%{separate_biarch_suffix}
2397 %defattr(-,root,root)
2398 %versbiarchlib libgfortran.a
2399 %versbiarchlib libgfortran.so
2400 %versbiarchlib libgfortran.spec
2401 %versbiarchlib libgfortranbegin.a
2402 %versbiarchlib libcaf_single.a
2403 %ifarch %quadmath_arch
2404 %versbiarchlib libquadmath.a
2405 %versbiarchlib libquadmath.so
2406 %endif
2407 %endif
2408
2409 %files -n libgfortran47
2410 %defattr(-,root,root)
2411 %mainlib libgfortran.so.*
2412
2413 %if %{separate_biarch}
2414 %files -n libgfortran47%{separate_biarch_suffix}
2415 %defattr(-,root,root)
2416 %biarchlib libgfortran.so.*
2417 %endif
2418
2419 %ifarch %quadmath_arch
2420 %files -n libquadmath47
2421 %defattr(-,root,root)
2422 %mainlib libquadmath.so.*
2423
2424 %if %{separate_biarch}
2425 %files -n libquadmath47%{separate_biarch_suffix}
2426 %defattr(-,root,root)
2427 %biarchlib libquadmath.so.*
2428 %endif
2429 %endif
2430 %endif
2431
2432 %if %{build_with_mudflap}
2433 %files -n libmudflap47
2434 %defattr(-,root,root)
2435 %mainlib libmudflap.so.0*
2436 %mainlib libmudflapth.so.0*
2437
2438 %if %{separate_biarch}
2439 %files -n libmudflap47%{separate_biarch_suffix}
2440 %defattr(-,root,root)
2441 %biarchlib libmudflap.so.0*
2442 %biarchlib libmudflapth.so.0*
2443 %endif
2444 %endif
2445
2446 %files info
2447 %defattr(-,root,root)
2448 %doc %{_infodir}/*.gz
2449
2450 %files -n cpp47
2451 %defattr(-,root,root)
2452 %dir %{_libdir}/gcc
2453 %dir %{_libdir}/gcc/%{GCCDIST}
2454 %dir %{libsubdir}
2455 %{_prefix}/bin/cpp%{binsuffix}
2456 %{libsubdir}/cc1
2457 #%{libsubdir}/specs
2458 %doc %{_mandir}/man1/cpp%{binsuffix}.1.gz
2459
2460 %if %{build_objc}
2461 %files objc
2462 %defattr(-,root,root)
2463 %{libsubdir}/cc1obj
2464 %{libsubdir}/include/objc
2465 %versmainlib libobjc.a
2466 %versmainlib libobjc.so
2467
2468 %if %{separate_biarch}
2469 %files objc%{separate_biarch_suffix}
2470 %defattr(-,root,root)
2471 %versbiarchlib libobjc.a
2472 %versbiarchlib libobjc.so
2473 %endif
2474
2475 %files -n libobjc47
2476 %defattr(-,root,root)
2477 %mainlib libobjc.so.*
2478
2479 %if %{separate_biarch}
2480 %files -n libobjc47%{separate_biarch_suffix}
2481 %defattr(-,root,root)
2482 %biarchlib libobjc.so.*
2483 %endif
2484 %endif
2485
2486
2487 %if %{build_objcp}
2488 %files obj-c++
2489 %defattr(-,root,root)
2490 %{libsubdir}/cc1objplus
2491 %endif
2492
2493
2494 %if %{build_ada}
2495 %files ada
2496 %defattr(-,root,root)
2497 %dir %{_libdir}/gcc
2498 %dir %{_libdir}/gcc/%{GCCDIST}
2499 %dir %{libsubdir}
2500 %{_prefix}/bin/gnat*
2501 %dir %{versmainlibdir}/adainclude
2502 %dir %{versmainlibdir}/adalib
2503 %{versmainlibdir}/adainclude
2504 %{versmainlibdir}/adalib/*.ali
2505 %{versmainlibdir}/adalib/*.a
2506 %{versmainlibdir}/adalib/libgnarl.so
2507 %{versmainlibdir}/adalib/libgnat.so
2508 %{versmainlibdir}/gnat1
2509
2510 %if %{separate_biarch}
2511 %files ada%{separate_biarch_suffix}
2512 %defattr(-,root,root)
2513 %dir %{versmainlibdirbi}/adainclude
2514 %dir %{versmainlibdirbi}/adalib
2515 %{versmainlibdirbi}/adainclude
2516 %{versmainlibdirbi}/adalib/*.ali
2517 %{versmainlibdirbi}/adalib/*.a
2518 %{versmainlibdirbi}/adalib/libgnarl.so
2519 %{versmainlibdirbi}/adalib/libgnat.so
2520 %endif
2521
2522 %files -n libada47
2523 %defattr(-,root,root)
2524 %mainlib libgnarl-*.so
2525 %mainlib libgnat-*.so
2526
2527 %if %{separate_biarch}
2528 %files -n libada47%{separate_biarch_suffix}
2529 %defattr(-,root,root)
2530 %biarchlib libgnarl-*.so
2531 %biarchlib libgnat-*.so
2532 %endif
2533 %endif
2534 # LIBJAVA-DELETE-END
2535
2536
2537 %if %{build_java}
2538 %if 0%{?building_libjava:1}
2539 %files -n gcc47-java
2540 %defattr(-,root,root)
2541 %{_prefix}/bin/gcj%{binsuffix}
2542 %{_prefix}/bin/gcjh%{binsuffix}
2543 %{_prefix}/bin/gcj-dbtool%{binsuffix}
2544 %{_prefix}/bin/jcf-dump%{binsuffix}
2545 %{_prefix}/bin/jv-convert%{binsuffix}
2546 %{_prefix}/bin/gc-analyze%{binsuffix}
2547 %{_prefix}/bin/aot-compile%{binsuffix}
2548 %{_prefix}/bin/rebuild-gcj-db%{binsuffix}
2549 %{libsubdir}/jc1
2550 %{libsubdir}/jvgenmain
2551 %{libsubdir}/ecj.jar
2552 %{libsubdir}/ecj1
2553 %doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
2554 %doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
2555 %doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
2556 %doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
2557 %doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
2558 %doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
2559 %doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
2560 %doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
2561 %endif
2562 %endif
2563
2564 %if %{build_java}
2565 %if %{build_libjava}
2566 %files -n libgcj47
2567 %defattr(-,root,root)
2568 %dir %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}
2569 %dir %{_libdir}/gcc
2570 %dir %{_libdir}/gcc/%{GCCDIST}
2571 %dir %{libsubdir}
2572 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/classmap.db
2573 # We usually do not multilib libjava
2574 %if %{biarch_libjava}
2575 %versbiarchlib libgcj.la
2576 %biarchlib libgcj.so.*
2577 %biarchlib libgij.so.*
2578 %biarchlib libgcj-tools.so.*
2579 %else
2580 %versmainlib libgcj.la
2581 %mainlib libgcj.so.*
2582 %mainlib libgij.so.*
2583 %mainlib libgcj-tools.so.*
2584 %endif
2585 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.la
2586 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.so
2587 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.la
2588 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.so
2589
2590 %files -n libgcj_bc47
2591 %defattr(-,root,root)
2592 %if %{biarch_libjava}
2593 %biarchlib libgcj_bc.so.*
2594 %else
2595 %mainlib libgcj_bc.so.*
2596 %endif
2597
2598 %files -n libgcj47-jar
2599 %defattr(-,root,root)
2600 %{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
2601 %{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
2602
2603 %files -n libgcj47-devel
2604 %defattr(-,root,root)
2605 %dir %{_prefix}/include/c++
2606 %dir %{libsubdir}
2607 %dir %{libsubdir}/include
2608 %dir %{gxxinclude}
2609 %{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
2610 %{libsubdir}/include/jawt.h
2611 %{libsubdir}/include/jawt_md.h
2612 %{libsubdir}/include/jni.h
2613 %{libsubdir}/include/jni_md.h
2614 %{libsubdir}/include/jvmpi.h
2615 %{gxxinclude}/gnu
2616 %{gxxinclude}/gcj
2617 %{gxxinclude}/java
2618 %{gxxinclude}/javax
2619 %{gxxinclude}/org
2620 %{gxxinclude}/sun
2621 %{libsubdir}/include/gcj
2622 %if %{biarch_libjava}
2623 %versbiarchlib libgcj.so
2624 %versbiarchlib libgcj.spec
2625 %versbiarchlib libgcj-tools.so
2626 %versbiarchlib libgij.so
2627 %versbiarchlib libgcj_bc.so
2628 %else
2629 %versmainlib libgcj.so
2630 %versmainlib libgcj.spec
2631 %versmainlib libgcj-tools.so
2632 %versmainlib libgij.so
2633 %versmainlib libgcj_bc.so
2634 %endif
2635
2636 %files -n gcc47-gij
2637 %defattr(-,root,root)
2638 %{_prefix}/bin/gij%{binsuffix}
2639 %{_prefix}/bin/gappletviewer%{binsuffix}
2640 %{_prefix}/bin/gjar%{binsuffix}
2641 %{_prefix}/bin/gjarsigner%{binsuffix}
2642 %{_prefix}/bin/gjavah%{binsuffix}
2643 %{_prefix}/bin/gkeytool%{binsuffix}
2644 %{_prefix}/bin/gnative2ascii%{binsuffix}
2645 %{_prefix}/bin/gorbd%{binsuffix}
2646 %{_prefix}/bin/grmic%{binsuffix}
2647 %{_prefix}/bin/grmid%{binsuffix}
2648 %{_prefix}/bin/grmiregistry%{binsuffix}
2649 %{_prefix}/bin/gserialver%{binsuffix}
2650 %{_prefix}/bin/gtnameserv%{binsuffix}
2651 %doc %{_mandir}/man1/gij%{binsuffix}.1.gz
2652 %doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
2653 %doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
2654 %doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
2655 %doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
2656 %doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
2657 %doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
2658 %doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
2659 %doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
2660 %doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
2661 %doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
2662 %doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
2663 %doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
2664 %endif
2665 %endif
2666 # LIBFFI-DELETE-END
2667
2668 %if %{build_java}
2669 %if 0%{?building_libffi:1}
2670 %files -n libffi47
2671 %defattr(-,root,root)
2672 %mainlib libffi.so.*
2673
2674 %if %{separate_biarch}
2675 %files -n libffi47%{separate_biarch_suffix}
2676 %defattr(-,root,root)
2677 %biarchlib libffi.so.*
2678 %endif
2679
2680 %files -n libffi47-devel
2681 %defattr(-,root,root)
2682 %{_prefix}/include/ffi.h
2683 %{_prefix}/include/ffitarget.h
2684 %mainlib libffi.so
2685 %mainlib libffi.a
2686 %{_libdir}/pkgconfig/libffi.pc
2687 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
2688 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
2689 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
2690
2691 %if %{separate_biarch}
2692 %files -n libffi47-devel%{separate_biarch_suffix}
2693 %defattr(-,root,root)
2694 %biarchlib libffi.so
2695 %biarchlib libffi.a
2696 %endif
2697 %endif
2698 %endif
2699 # GCC-TESTSUITE-DELETE-END
2700
2701 %if 0%{?run_tests:1}
2702 %files -n gcc47-testresults
2703 %defattr(-,root,root)
2704 %doc testresults/test_summary.txt
2705 %doc testresults/*.sum
2706 %doc testresults/*.log
2707 %endif
2708
2709
2710 %changelog