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