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